-
Notifications
You must be signed in to change notification settings - Fork 172
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
Defense in Depth - Security Scanning #222
Comments
We may want to consider separating the container image from the software versions. Having to do a full release every time we do this, it may slow down development significantly necessarily. We'd have to somehow verify the container image's integrity and have some sort of anti-rollback mechanism to prevent avoid a malicious docker hub. I believe @legoktm had showed interest specifically in this question. The additional benefit is that a 700MB can't be on any official repos, whereas a smaller |
Yes! See #154 for some more reasons on why to split the container out of the package.
You can pin to specific sha256 checksums, e.g. https://github.com/freedomofpress/securedrop/blob/develop/securedrop/dockerfiles/focal/python3/Dockerfile. And supposedly you can GPG sign and verify containers (e.g. https://docs.podman.io/en/latest/markdown/podman-image-sign.1.html) but I've never tried that myself. |
Perfect. We'll have to look into that, then. |
Circle CI (which we're already using) has "scheduled" pipelines. It could be useful here. |
I've made some progress on the security scanning front, and I'd like to write down my suggestion, for which I'll send a PR soon: Items to scanIt seems to me that we should scan the following items, for completeness:
Also, we need to scan the same items (application, container image) for the latest release as well (currently v0.4.1). This way, we are always aware about security issues both at the tip of our CVE HandlingSecurity scans are bound to find lots of CVEs. Assessing those CVEs is important, but can take lots of time. So, for starters, we need to focus our energy on the CVEs that are important. My suggestion is to only consider CVEs with severity "Critical", and a fix present. Suppose that a CVE that matches the above criteria is found by our security scanner. We can differentiate on the action we'll take based on where it was detected (
Triggering CI workflowsWe can run the security scans for pushes, PRs, and nightly, but we should make an exception for the released artifacts. Since any new code will not affect those, security scans for them should run nightly only. For CVEs that affect the |
Add two GitHub Actions workflows, that perform the following checks: * Security scan the Python dependencies of the Dangerzone application (`poetry.lock`), for the current/main branch. * Build and security scan the Dangerzone container image for the current/main branch. * Security scan the Python dependencies of the Dangerzone application (`poetry.lock`), for the latest release of Dangerzone (currently v0.4.1). * Download and security scan the Dangerzone container image for the latest release of Dangerzone (currently v0.4.1). The first two checks will run on branch pushes, PRs, and nightly. The last two checks will run only nightly, since the code in the current branch cannot affect already released artifacts. Also, besides the security scans, these workflows will also update the Security alerts in the GitHub page for the Dangerzone project, and print the SARIF report to the stdout, for debugging purposes. Closes #222
Add two GitHub Actions workflows, that perform the following checks: * Security scan the Python dependencies of the Dangerzone application (`poetry.lock`), for the current/main branch. * Build and security scan the Dangerzone container image for the current/main branch. * Security scan the Python dependencies of the Dangerzone application (`poetry.lock`), for the latest release of Dangerzone (currently v0.4.1). * Download and security scan the Dangerzone container image for the latest release of Dangerzone (currently v0.4.1). The first two checks will run on branch pushes, PRs, and nightly. The last two checks will run only nightly, since the code in the current branch cannot affect already released artifacts. Also, besides the security scans, these workflows will also update the Security alerts in the GitHub page for the Dangerzone project, and print the SARIF report to the stdout, for debugging purposes. Closes #222
Parent issue: #221
Attackers that want to escape the Dangerzone container, first need to find a vulnerability in the conversion software. Ensuring that no such vulnerabilities exist is the first layer of defense against attackers.
In practice, we can't guarantee that the installed software does not have any security vulnerabilities. However, what we can do is:
dangerzone.rocks/dangerzone
container image.The text was updated successfully, but these errors were encountered: