-
Notifications
You must be signed in to change notification settings - Fork 11
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
[ENT-12099] Initial implementation of an experimental feature of policy set analysis #218
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jakub-nt <[email protected]>
Signed-off-by: jakub-nt <[email protected]>
Thanks for submitting a PR! Maybe @craigcomstock can review this? |
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.
a few questions/comments, all looks good-to-go except maybe moving the release-information checksum into a separate file, that might be a nice change for maintenance purposes.
fetch_archive(RI_ARCHIVE_URL, RI_SHA1_CHECKSUM, with_index=False) | ||
# TODO the release information checksum needs to be updated on each new release | ||
# currently, if the checksum is not manually updated, the old, already downloaded files will continue to be used | ||
# and if the old files have not already been downloaded, the download from GitHub will fail |
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.
Right. So when we release we need to update this.
We need to add instructions to this template ticket for releases: https://northerntech.atlassian.net/browse/ENT-12575
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.
I added a note already referring to line 83 above but we should update it after merging this PR to the "real" location/URL. Maybe it would be better to externalize this checksum in a single file for easier maintenance so folks could just "edit file" in github and make a PR without having to search through analyze.py?
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.
@craigcomstock @jakub-nt no, we should not do it like this. As it's implemented here, cfbs analyze
essentially stops working in all versions of cfbs when we release something new in release-information, and we have to release a new version of cfbs to fix it.
Keep in mind that HTTPS already has signatures and thus integrity checking, and so should be protected against corrupt downloads / MITM attacks. So what we are doing here is an additional check, to protect against for example a compromised user having access to edit the data in GitHub.
The correct way to do this is via some form of "releases". Either GH releases, with a download zip and a checksums.txt - assuming that they are a bit better protected, i.e. fewer people have access to edit releases. Or to avoid the single point of failure in GitHub, we could put the checksums.txt in another place, like our cfengine.com website, via the releases.json.
…nalyze` Signed-off-by: jakub-nt <[email protected]>
Signed-off-by: jakub-nt <[email protected]>
No description provided.