Security check
What Brunel's security check looks for in a repository (committed secrets, source-code flaws, dependency vulnerabilities from OSV, Dockerfile, Compose, CI and infrastructure-as-code risks), how findings are reported, and the fixes Brunel proposes.
Know what could hurt you in production. The security check runs with every analysis, reads the same files as the detectors, and executes nothing.
Coverage by plan
| Check | Free | Pro and above |
|---|---|---|
| Committed secrets | Yes | Yes |
| Dockerfile and Compose | Yes | Yes |
| Source code (JavaScript, TypeScript, Python, Go, Java, PHP) | — | Yes |
| Known vulnerable dependencies (OSV) | — | Yes |
| CI workflows (GitHub Actions) | — | Yes |
| Existing Terraform and Kubernetes | — | Yes |
Finding format
Every finding has a severity (critical, high, medium, low), a title, the file and line it comes from, an explanation and a fix. Excerpts of secrets are masked (the first four characters, then dots) before anything is stored.
Committed secrets
Brunel looks for values that are secrets by their shape, not by guessing: AWS access keys, private keys, GitHub tokens, Stripe live secret keys, AI provider API keys, Slack tokens and webhook URLs, SendGrid keys, Google API keys, passwords inside connection strings, and filled .env files that were committed. Values found under docs/, examples/, fixtures/, tests or in Markdown files are reported one severity lower, since they are often placeholders.
Dependencies
Brunel reads exact versions from lockfiles and pinned manifests (package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, poetry.lock, uv.lock, Pipfile.lock, go.mod, Cargo.lock, Gemfile.lock, composer.lock) and queries the public OSV database (https://osv.dev). Each vulnerable package is one finding with its versions, the advisories and the fixed version when there is one. Without a lockfile, versions are ranges and Brunel says so instead of guessing.
Dockerfiles and Compose
- Base image not pinned to a version or digest.
- The container runs as root (no
USER). - A secret baked into the image through
ENVorARG. ADDof a remote URL, or a remote script piped into a shell during the build.- World-writable permissions (
chmod 777), SSH port exposed. - In Compose: privileged containers, host network, the Docker socket mounted, database ports published on every interface, hard-coded passwords.
CI workflows
pull_request_targetworkflows, especially those that check out the pull request's code.- Untrusted input (issue titles, branch names…) interpolated directly into a shell step.
- Token permissions not declared, or write access to everything.
- Third-party actions pinned by tag instead of commit SHA.
- A step that prints a secret.
Existing infrastructure code
- Security groups open to the whole internet (all ports, or sensitive ones).
- Storage buckets readable by anyone.
- Databases reachable from the internet, storage encryption disabled.
- Passwords written in Terraform code, databases deleted without a final snapshot.
Proposed fixes
When a finding has a mechanical fix, Brunel writes it for you. The finding shows Fix ready and, under its explanation, the change as a diff. The changes are deterministic, rule by rule, and never come from the AI.
| Finding | Proposed change |
|---|---|
| Container runs as root | USER before CMD: the image's own user (node) or uid 10001 |
SSH port exposed, chmod 777 | Port 22 removed from EXPOSE, mode 755 |
| Database port published on every interface | Bound to 127.0.0.1 |
| Privileged container in Compose | privileged: true removed |
Token permissions not declared, write-all | permissions: contents: read |
| Public database or bucket, unencrypted storage | publicly_accessible = false, acl = "private", encryption on |
| Database deleted without a final snapshot | skip_final_snapshot = false and a final_snapshot_identifier |
Filled .env file committed | File deleted, added to .gitignore, .env.example with the keys and no values |
| Vulnerable dependency (npm, pip, Go) | Version raised to the fixed one; an overrides, pnpm.overrides or resolutions entry when the package comes through another one |
Findings that need your decision keep their written advice only: which network may reach an open port, which image tag to pin, rotating a secret.
Two ways to apply the fixes:
- Download .patch (every plan): a
git applypatch with every proposed change. A deleted file is listed as agit rmcommand, never with its content. - Open a pull request with the fixes (Pro and above, GitHub write access): one branch
brunel/security-fixes-<date>and one pull request. Each fix is computed again on the branch as it is now, so a file changed since the analysis gets the fix for its current content, and a fix already applied is left out. Workflow files need the GitHubworkflowpermission; without it they are left out and the pull request says so.
What findings lead to
Findings are not only a report: each one comes with a fix you can apply, or, on Pro and above, open as a pull request on your repository, and reliability certificates use them as criteria.