Skip to content

Instantly share code, notes, and snippets.

@openfly
Created December 12, 2016 18:58
Show Gist options
  • Save openfly/a43cf7c139b46cc7b056884846b5be7a to your computer and use it in GitHub Desktop.
Save openfly/a43cf7c139b46cc7b056884846b5be7a to your computer and use it in GitHub Desktop.
bandit test on python-symphony module
(bandit) ➜ python-symphony git:(master) bandit -r symphony
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 2.7.5
Run started:2016-12-12 18:57:31.838606
Test results:
>> Issue: [B108:hardcoded_tmp_directory] Probable insecure usage of temp file/directory.
Severity: Medium Confidence: Medium
Location: symphony/Crypt/__init__.py:23
22 def write_tmpfile(self, string):
23 path = '/tmp/' + hashlib.sha224(string).hexdigest()
24 filehandle = open(path, 'w')
--------------------------------------------------
Code scanned:
Total lines of code: 457
Total lines skipped (#nosec): 0
Run metrics:
Total issues (by severity):
Undefined: 0
Low: 0
Medium: 1
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 1
High: 0
Files skipped (0):
pretty solid...
got a stackoverflow open for that issue...
http://stackoverflow.com/questions/40593451/is-there-a-way-to-create-an-encrypted-memory-block-hosting-a-filesystem-for-a-us
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment