Table Of Contents
Security audit
Executive summary
This audit was done by scanning Slips with the free open-source tools: Trivy and Bearer, and fixing the reported issues.
The main problems fixed by this audit were the web interface DB switch endpoint, unsafe command/path/SQL/HTML handling reported by Bearer, permissive directory permissions, and old dependencies in the Docker image.
The web interface issue was the highest impact one. webinterface/app.py used to start Flask on 0.0.0.0 using the configured web port, which is 55000 in config/slips.yaml. It also exposed /db/<new_port> as a state-changing GET endpoint without authentication or CSRF protection. This was fixed by binding the web interface to localhost, changing the DB switch to a CSRF-protected POST, and validating the requested Redis port.
The dependency fixes were handled in the Docker image and requirements files. Further dependency security patches will be handled automatically using Dependabot, for example: #1939, #1917, #1798, and #1772.
Scope
The scope of this audit is:
Containers and Docker build files
Dependencies installed through apt, Python, and Go
Default configuration values
The codebase paths reported by Bearer
The web interface, core Slips code, and detection modules
Methodology and used tools
We used the following open source tools:
After the scans, the findings were checked manually. The table below includes only the fixed issues. Findings that are still waiting for upstream dependency fixes are not listed here.
Findings
Full table sorted by severity (Critical first), with the CVE column converted to CVE/CWE.
CVE/CWE |
Severity |
Finding |
Component |
Status |
|---|---|---|---|---|
- |
Critical |
- Unauthenticated Redis DB switching. |
- |
Fixed by: |
- |
Critical |
- Web interface exposed on all interfaces. |
- |
Fixed by binding Flask to |
- |
Critical |
Insecure HTTP connections reported by Bearer. |
- |
Fixed by switching supported lookups to HTTPS. |
- |
Critical |
Command execution paths used scanner-reported input without enough validation. |
- |
Fixed by validating: |
- |
Critical |
Dynamic SQL identifiers and values were built from external data in the SQLite wrappers reported by Bearer. |
- |
Fixed by: |
- |
Critical |
- Old Go runtime and Go modules in the |
- |
Fixed by: |
- |
Critical |
The old copied Iris binary path in the image, |
- |
Fixed by: |
- |
High |
Dynamic HTML insertion could render untrusted data as HTML in the web interface. |
|
Fixed by replacing |
- |
High |
Permissive file and directory permissions. |
- |
Fixed by using: |
- |
High |
User-supplied config file path was accepted without normalizing it through Slips path validation. |
|
Fixed by validating the config path after checking that it exists. |
- |
High |
Python dependencies had fixed Trivy findings in: |
- |
Fixed by upgrading: |
- |
High |
- The Docker image kept build-only packages in the final image. |
|
Fixed by: |
Notes
Bearer and Trivy reported some false positives. We investigated and discarded them. Example of the FPs that are not an issue in Slips context: when the reported path is
not reachable by untrusted users
is only used with local Slips-controlled data
or is a p2p related path that is already constrained by Slips P2P trust models.
Data received and used by P2P, Fides, and Iris is intentionally not sanitized. Slips relies on its local trust model there.
Some vulnerabilities are not disclosed here because the upstream maintainers of the affected dependencies have not released fixed versions yet. We are monitoring them and will update Slips once fixed versions are available.
How AI was used here
brainstorming, checking best practice, comparing available tools.
debugging and fixing of unit and integration tests.
suggesting mitigations for some of the reported CVEs and CWEs. e.g the multi-stage build in docker
The following vulnerabilities were fixed by AI:
CVE-2024-35870
CWE-78 and CWE-88 (sanitization of command execution paths of all modules and core code.)
Polishing and formatting this report.
CVEs fixed by the AI were reviewed and tested manually by a human :)