-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible: replace test_admin key with a valid sec/pub key #2925
Conversation
b617684
to
cf9815f
Compare
@emkll in case you're bored today :-) |
@redshiftzero Looks like your work on PyCrypto upgrade is right on time ! !/bin/bash -eo pipefail make safety Checking file ./securedrop/requirements/test-requirements.txt safety report checked 22 packages, using default DB --- No known security vulnerabilities found. Checking file ./securedrop/requirements/admin-requirements.txt safety report checked 15 packages, using default DB --- -> pycrypto, installed 2.6.1, affected <=2.6.1, id 33151 Heap-based buffer overflow in the ALGnew function in block_templace.c in Python Cryptography Toolkit (aka pycrypto) allows remote attackers to execute arbitrary code as demonstrated by a crafted iv parameter to cryptmsg.py. -- Makefile:101: recipe for target 'safety' failed make: *** [safety] Error 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, @dachary. Can confirm the private key and public key form a keypair and the fingerprint is blacklisted when validating.
To eliminate the possibility of this key being erroneously used, perhaps in the future it could be automatically generated in staging/CI with a configuration flag.
This will need a rebase on latest develop prior to merge due to failing staging build, due to #2931, apologies |
cf9815f
to
1c5e513
Compare
Transient CircleCI error https://circleci.com/gh/freedomofpress/securedrop/7256?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link Allocating a remote Docker Engine Got error while creating host: rpc error: code = Unknown desc = An internal error occured when provisioning resources for this job. Provisioning Service returned status code: 503 We had an unexpected error preparing a VM for this build, potentially due to our infrastructure or cloud provider. Please retry the build in a few minutes |
6a5c4ef
to
d163111
Compare
The test_admin_key.pub and test_admin_key.sec are both public keys. This is fine as long as the tests do not try to decrypt anything. A new key is created and stored instead to allow for OSSEC tests to decrypt mails.
d163111
to
6f35b14
Compare
Thanks for the update :-) |
Codecov Report
@@ Coverage Diff @@
## develop #2925 +/- ##
========================================
Coverage 85.24% 85.24%
========================================
Files 32 32
Lines 1952 1952
Branches 218 218
========================================
Hits 1664 1664
Misses 237 237
Partials 51 51 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Still looks good, perhaps in the future we could automate the keypair generation to avoid committing secrets to GitHub :) .
@emkll it's kind of scary to commit private keys, indeed :-) |
Conflicts: .circleci/config.yml Favored develop since admin test jobs were added in develop in #2758. install_files/ansible-base/roles/ossec/files/test_admin_key.pub install_files/ansible-base/roles/ossec/files/test_admin_key.sec Favored develop for these changes since these keys in 0.5.2 were erroneously both public keys (fixed in #2925). install_files/ansible-base/securedrop-configure.yml Deleted this file as it was removed in develop during the sdconfig refactor (#2758) from Ansible to Python. The locale prompt additions added in SecureDrop 0.5.2 were added in #2758 on develop. molecule/aws/scripts/app-tests.sh Favored develop since the addition of RTL language testing was added in #2930. molecule/aws/side_effect.yml Favored release/0.5.2 as these changes were due to the addition of Tor apt repo testing in CI against release branches (#2941). securedrop/Dockerfile Favored develop since all these gettext commands being merged into one RUN command was done in #2822 and is still on develop.
Conflicts: .circleci/config.yml Favored develop since admin test jobs were added in develop in #2758. install_files/ansible-base/roles/ossec/files/test_admin_key.pub install_files/ansible-base/roles/ossec/files/test_admin_key.sec Favored develop for these changes since these keys in 0.5.2 were erroneously both public keys (fixed in #2925). install_files/ansible-base/securedrop-configure.yml Deleted this file as it was removed in develop during the sdconfig refactor (#2758) from Ansible to Python. The locale prompt additions added in SecureDrop 0.5.2 were added in #2758 on develop. molecule/aws/scripts/app-tests.sh Favored develop since the addition of RTL language testing was added in #2930. molecule/aws/side_effect.yml Favored release/0.5.2 as these changes were due to the addition of Tor apt repo testing in CI against release branches (#2941). securedrop/Dockerfile Favored develop since all these gettext commands being merged into one RUN command was done in #2822 and is still on develop.
Conflicts: .circleci/config.yml Favored develop since admin test jobs were added in develop in #2758. install_files/ansible-base/roles/ossec/files/test_admin_key.pub install_files/ansible-base/roles/ossec/files/test_admin_key.sec Favored develop for these changes since these keys in 0.5.2 were erroneously both public keys (fixed in #2925). install_files/ansible-base/securedrop-configure.yml Deleted this file as it was removed in develop during the sdconfig refactor (#2758) from Ansible to Python. The locale prompt additions added in SecureDrop 0.5.2 were added in #2758 on develop. molecule/aws/scripts/app-tests.sh Favored develop since the addition of RTL language testing was added in #2930. molecule/aws/side_effect.yml Favored release/0.5.2 as these changes were due to the addition of Tor apt repo testing in CI against release branches (#2941). securedrop/Dockerfile Favored develop since all these gettext commands being merged into one RUN command was done in #2822 and is still on develop. docs/development/contributor_guidelines.rst Favored develop since these contributor guidelines were added recently in #2972.
Conflicts: .circleci/config.yml Favored develop since admin test jobs were added in develop in #2758. install_files/ansible-base/roles/ossec/files/test_admin_key.pub install_files/ansible-base/roles/ossec/files/test_admin_key.sec Favored develop for these changes since these keys in 0.5.2 were erroneously both public keys (fixed in #2925). install_files/ansible-base/securedrop-configure.yml Deleted this file as it was removed in develop during the sdconfig refactor (#2758) from Ansible to Python. The locale prompt additions added in SecureDrop 0.5.2 were added in #2758 on develop. molecule/aws/scripts/app-tests.sh Favored develop since the addition of RTL language testing was added in #2930. molecule/aws/side_effect.yml Favored release/0.5.2 as these changes were due to the addition of Tor apt repo testing in CI against release branches (#2941). securedrop/Dockerfile Favored develop since all these gettext commands being merged into one RUN command was done in #2822 and is still on develop. docs/development/contributor_guidelines.rst Favored develop since these contributor guidelines were added recently in #2972.
Status
Ready for review
Description of Changes
The test_admin_key.pub and test_admin_key.sec are both public
keys. This is fine as long as the tests do not try to decrypt
anything.
A new key is created and stored instead to allow for OSSEC tests to
decrypt mails.
Testing
Deployment
N/A
Checklist
If you made changes to the app code: