Code Monkey home page Code Monkey logo

flowframe's Introduction

FlowFrame

FlowFrame is a Scala compiler plugin that performs static, fine-grained information flow analysis on code to detect privacy violations, in the spirit of the Jif compiler (https://www.cs.cornell.edu/jif/).

The project is organized as a hierarchy of top-level traits, each of which extend the functionality of the previous trait: CheckLabels extends SparkSignatures extends DefaultPolicies extends AbstractPolicies extends Solvers extends Constraints extends Policies.

Here is a quick rundown of what’s in each file:

  • purpose/PurposePolicies.scala - implementation of Purpose Policies
  • purpose/PurposePolicyParser.scala - parser for Purpose Policy annotations
  • purpose/predicates/Predicates.scala - incomplete implementation of PurposePolicy predicates (i.e. the stuff that comes after the with operator in Purpose Policies)
  • CheckLabels.scala - implements constraint generation pass
  • Constraints.scala - data structures for policy constraints
  • DefaultPolicies.scala - code for calculating default policies in the absence of policy annotations
  • FlowFramePlugin.scala - implements Scala’s plugin interface
  • Policies.scala - basic data structure for policies
  • AbstractPolicies.scala - data structures for abstract policies, policy references, policy signatures and policy structures
  • PolicyViolationDebugInfo.scala -helpful information for debugging policy violations
  • Solvers.scala - policy constraint solver
  • SparkSignatures.scala - policy signatures for Spark operations

Requirements

FlowFrame currently supports Scala 2.11 and 2.12.

Building FlowFrame

Run sbt package to create jars for the compiler plugin and the runtime. You can find these jars in flowframe-plugin/target and flowframe-runtime/target.

Using FlowFrame

To use FlowFrame, add the following commandline options to scalac:

  • -Xplugin:</path/to/plugin/jar>
  • -P:flowframe:lang:<policy language>

Currently, FlowFrame only supports the purpose policy language.

How FlowFrame works

FlowFrame uses @policy annotations on case classes representing database table rows accessed through the Spark Dataset API. Any named entity can be given explicit policy annotations, but FlowFrame attempts to infer annotations whenever possible. Ideally, only input and output Datasets will require annotations.

See the CONTRIBUTING file for how to help out.

License

FlowFrame is Apache 2.0 licensed, as found in the LICENSE file.

flowframe's People

Contributors

owenarden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.