Skip to content

Add refactoring and documentation improvements#2

Open
razvand wants to merge 7 commits into
masterfrom
improve
Open

Add refactoring and documentation improvements#2
razvand wants to merge 7 commits into
masterfrom
improve

Conversation

@razvand

@razvand razvand commented May 2, 2021

Copy link
Copy Markdown
Member

Make the following changes:

  • Use 4-space indentation for Python scripts.
  • Use Python3.
  • Remove trailing whitespaces.
  • Remove (and ignore) generated files.
  • Check program arguments.
  • Improve and update documentation.

razvand added 7 commits May 2, 2021 20:21
Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
`facts.pl` stores generated Prolog facts. `factsAndRules.pl` is
generated by concatenating the generated `facts.pl` files and the
existing `rules.pl` file.

Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Make the following changes:
* The script requires a single argument: the sandbox profile file (in
SBPL format).
* Check program arguments and print usage message in case of incorrect
number of arguments.
* Print user messages for each step.
* Hardcode file names: `facts.pl`, `rules.pl`, `factsAndRules.pl`.
* Update `README.md` accordingly. Add sample usage.

Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Add FIXME comment to investigate the issue.

Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Signed-off-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
@razvand razvand self-assigned this May 2, 2021
@razvand
razvand requested a review from teodutu May 2, 2021 18:47

@teodutu teodutu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is in order as far as I can tell, except for a few typos. I'm unsure, however, whether we should keep both smartPly.py and sandscout_compiler.py as they both seem to be the same thing.

Comment thread README.md
It uses Prolog-based queries to evaluate file-based security properties of iOS sandbox profiles.

The [SandScout paper](https://dl.acm.org/doi/10.1145/2976749.2978336) (`SandScout: Automatic Detection of Flaws in iOS Sandbox Profiles`), presented at ACM CCS 2016, details the architecture and implementation of SandScout and our findings.
In the paper SandScout was used to evaluate the `container` sandbox profile for iOS 9.0.2 and discover seven classes of exploitable vulnerabilities.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comma after "paper".

Comment thread rules.pl

%Query 4 is similar to query 2, but it only show subpaths and literals that are in /private/var/mobile

% Query 4 is similar to query 2, but it only show subpaths and literals that are in /private/var/mobile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"shows" instead of "show"

Comment thread smartPly.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What seems to be a copy of this string has already been refactored in this PR #1. Is it worth keeping both of them?

Comment thread rules.pl

%Query 4 is similar to query 2, but it only show subpaths and literals that are in /private/var/mobile

% Query 4 is similar to query 2, but it only show subpaths and literals that are in /private/var/mobile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"shows" instead of "show".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants