CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 9m17s
Our ~35 own rules left whole languages without SAST findings. Three permissively licensed community packs now run next to them, on the same semgrep invocation (--metrics=off, local files only): - GitLab sast-rules v2.10.1 (53bf5cf6): 148 rules for C#, Java, JavaScript/TypeScript, Python and one Go rule; only files whose header says "License: MIT (c) GitLab Inc.". Not vendored: c/ (every file GPL-2.0, generated from flawfinder), go/ apart from one file (Apache-2.0 gosec ports), scala/, rules/lgpl, rules/lgpl-cc (Commons Clause), rules/gitlab (EE). - 0xdea semgrep-rules (dae50da6, MIT): 35 C/C++ rules. - elttam semgrep-rules (24426856, MIT; its LICENSE carries the Semgrep template's copyright line): 34 rules for Java, Go and Struts/Spring XML. Each pack lives in compliance-agent/rules/vendor/<source>/ with LICENSE, NOTICE (provenance, what was left out and why) and UPSTREAM (pinned commit): upstream/ holds the selected files unchanged with their tests, pack.yaml the rules the agent runs, ids prefixed per source (gitlab-, 0xdea-, elttam-), rules.json an index for the tests. scripts/vendor-semgrep-rules.py regenerates all of it deterministically. Provenance: every candidate rule was compared with the Semgrep registry (semgrep/semgrep-rules, read only for the comparison). Eight GitLab Python/JS rules with the same message or the same patterns are not vendored, nor are elttam's Kubernetes rules (registry-derived). Also left out: elttam's entrypoint enumerators, its ORM-leak hints, three files whose upstream tests fail on semgrep 1.177 and a join-mode rule. Noise budget: run over the nightly fixtures, the public samples and FreeRTOS-Kernel, lwIP, OpenRA, eShopOnWeb, requests, express and spring-petclinic. 15 rules that flood real code (0xdea missing-return 1514 hits, typos 989, interesting-api-calls 718, signed-unsigned-conversion 221, suspicious-assert 176, format-string-bugs 61 ...; GitLab assert-used) are dropped from the pack, each listed with its reason in NOTICE. CPU time of the semgrep run roughly doubles on C-heavy trees (FreeRTOS-Kernel 70 s -> 136 s, lwIP 18 s -> 68 s), well inside the 10-minute stage timeout. Ids stay bare (#473 logic covers the vendored ids, fingerprint() unchanged). The control map gets one vendored semgrep binding per control, by CWE (by rule id for the few elttam rules without one), with exactly the languages of the rules behind it; a test checks every vendored rule maps to a control that claims its languages. Guard: semgrep_args() builds the one invocation; a test fails if any --config is not a staged local pack, or is auto, p/, r/ or a URL, and another scans the agent source, scripts, docker/, CI and Dockerfile.agent for a registry config. Nightly baselines with C, Python, C# or JS code change and need a bless run after the image is deployed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
329 lines
23 KiB
Markdown
329 lines
23 KiB
Markdown
# Tools & Scanners
|
|
|
|
Prüfwerk uses a combination of open-source scanners and AI-powered analysis to provide comprehensive security coverage. This page describes each tool and how it contributes to the scan pipeline.
|
|
|
|
## Semgrep -- Static Analysis (SAST)
|
|
|
|
[Semgrep](https://semgrep.dev/) is an open-source static analysis engine (LGPL-2.1) that finds vulnerabilities by matching patterns in source code.
|
|
|
|
Prüfwerk runs the engine with **its own CRA rules** and **three vendored,
|
|
MIT-licensed community rule packs**. Its own rules:
|
|
|
|
- Python and JavaScript/TypeScript: secure defaults, weak password hashing,
|
|
insecure session cookies, weak ciphers for data at rest, shell commands and
|
|
SQL statements built from variables, request input echoed into a response,
|
|
plain `http://` requests, and (Python) hard-coded credentials.
|
|
- C and C++: unbounded string functions, non-literal format strings,
|
|
hard-coded credentials, broken hashes and ciphers, `rand()` for security.
|
|
- Swift and Objective-C (iOS apps): passwords, tokens and keys kept in
|
|
`UserDefaults` / `NSUserDefaults` (also through `@AppStorage`) instead of the
|
|
Keychain. The Objective-C rule is a text pattern, as Semgrep cannot parse
|
|
Objective-C.
|
|
|
|
The vendored packs (#492), each pinned to an upstream commit and shipped
|
|
in the agent with its licence and a NOTICE (`compliance-agent/rules/vendor/`):
|
|
|
|
| Source | Licence | Rules | Languages |
|
|
|---|---|---|---|
|
|
| [GitLab SAST rules](https://gitlab.com/gitlab-org/security-products/sast-rules) v2.10.1 | MIT (only files with GitLab's MIT header) | 148 | C#, Java, JavaScript/TypeScript, Python, one Go rule |
|
|
| [0xdea semgrep-rules](https://github.com/0xdea/semgrep-rules) | MIT | 35 | C, C++ |
|
|
| [elttam semgrep-rules](https://github.com/elttam/semgrep-rules) | MIT | 34 | Java, Go, Struts/Spring XML |
|
|
|
|
Their rule ids carry the source as a prefix (`gitlab-…`, `0xdea-…`,
|
|
`elttam-…`), and they count for the CRA controls by CWE. Rules that match a
|
|
Semgrep registry rule, review hints and rules that flood real firmware and
|
|
library code with false positives (measured on FreeRTOS, lwIP and the nightly
|
|
fixtures) are left out; each pack's NOTICE lists them with the reason. Not
|
|
vendored at all: GitLab's C rules (GPL-2.0, generated from flawfinder), its
|
|
gosec-derived Go rules (Apache-2.0) and its LGPL/Commons Clause/EE
|
|
directories, and elttam's Kubernetes rules (derived from registry rules).
|
|
|
|
The rules of the Semgrep registry (`--config=auto`, `p/...`) are not used:
|
|
their licence (Semgrep Rules License v1.0) allows internal use only, not a
|
|
service offered to others, and `auto` cannot run without sending metrics to
|
|
Semgrep. A test fails if the agent's semgrep run, a script or the CI ever
|
|
names a registry config. Semgrep runs with `--metrics=off` and no version
|
|
check, so nothing about your code leaves the scan. Code in a language no rule
|
|
covers gets no Semgrep findings; the CRA view says so (*Keine Prüfregel für
|
|
den gefundenen Code*) instead of reporting it as clean.
|
|
|
|
Semgrep produces **Codeanalyse (SAST)** findings with file paths, line numbers, and rule descriptions.
|
|
|
|
## cppcheck -- C and C++ Analysis
|
|
|
|
[cppcheck](https://cppcheck.sourceforge.io/) runs on trees with C or C++ code.
|
|
Where Semgrep matches patterns, cppcheck follows values through the code, which
|
|
finds the defects that matter in firmware: out-of-bounds writes, uninitialised
|
|
reads, null dereferences and leaks. It parses the code and never runs it. Its
|
|
findings are **Codeanalyse (SAST)** findings with the tool name `cppcheck`.
|
|
|
|
## mobsfscan -- Android and iOS Apps
|
|
|
|
[mobsfscan](https://github.com/MobSF/mobsfscan) (LGPL-3.0, used unchanged) runs
|
|
on trees with Java, Kotlin, Swift or Objective-C code. It checks the code and
|
|
the app settings:
|
|
|
|
- **AndroidManifest.xml:** `debuggable`, `allowBackup`, cleartext traffic, an
|
|
outdated `minSdkVersion`, exported components, task hijacking.
|
|
- **Info.plist:** App Transport Security exceptions (`NSAllowsArbitraryLoads`).
|
|
- **Code:** WebViews with a JavaScript bridge or ignored TLS errors, weak hashes
|
|
and ciphers, ECB mode and static IVs, `java.util.Random` for security,
|
|
world-readable storage, trust-all certificate handling, command and SQL
|
|
injection, unsafe deserialisation, sensitive data in logs.
|
|
|
|
Each finding carries its CWE and the OWASP MASVS requirement. mobsfscan runs
|
|
once with the Android and once with the iOS rules when a repository holds both
|
|
apps (React Native, Flutter); on its own it would check such a repository as
|
|
Android only. It runs on the same Semgrep engine with metrics off, never reads
|
|
a `.mobsf` file from your repository, and skips `Pods/`, `build/`, `.gradle/`,
|
|
`DerivedData/`, `Carthage/` and `node_modules/`. Its findings are
|
|
**Codeanalyse (SAST)** findings with the tool name `mobsfscan`.
|
|
|
|
### iOS app settings
|
|
|
|
Prüfwerk reads every `Info.plist` and the `INFOPLIST_KEY_*` build settings of
|
|
the Xcode project (outside `Pods/` and `Carthage/`) itself, as findings with the
|
|
tool name `ios-config`:
|
|
|
|
- **Custom URL schemes** (`CFBundleURLTypes`, Low): any app can register the
|
|
same scheme and receive the URLs meant for this one; Universal Links avoid it.
|
|
- **Sensitive permissions** (`NS…UsageDescription`, Info): location, camera,
|
|
microphone, contacts, photos, calendars, Bluetooth, local network, health,
|
|
motion, speech, tracking. An inventory for the risk assessment and the privacy
|
|
notice, not a violation.
|
|
- **Permission requests without a usage string** (Low): code that asks for one
|
|
of these while no plist explains why; iOS terminates the app at that call.
|
|
Judged only when the repository holds a plist or an Xcode project.
|
|
|
|
The first two map to no CRA requirement: a minimal attack surface and data
|
|
minimisation are judged in the design review.
|
|
|
|
Not reported: the app-wide "missing protection" hints (no certificate pinning,
|
|
no root or jailbreak detection, no screenshot protection). They name no place in
|
|
the code and are heuristics. Dart code (Flutter) has no rules yet.
|
|
|
|
## Vendor Code Exclusion
|
|
|
|
Firmware projects carry their silicon vendor's SDK (HAL, CMSIS, board support)
|
|
and third-party middleware next to their own code. Findings in that code are not
|
|
yours to fix, so it is left out of the code findings (SAST, patterns, secrets,
|
|
lint). What counts as vendor code:
|
|
|
|
- directories named `CMSIS`, `Third_Party`, `vendor` (and similar), or ending in
|
|
`_HAL_Driver` / `_StdPeriph_Driver`;
|
|
- ST's generated layouts (`Drivers/` next to `Core/`, `Middlewares/`);
|
|
- a vendored library wherever it sits, recognised by the files it always ships
|
|
(Mbed TLS, lwIP, the FreeRTOS kernel, wolfSSL, FatFs);
|
|
- build output and installed third-party code of apps, when committed:
|
|
Gradle's `build/` beside a `build.gradle` and `.gradle/`, `Pods/` beside a
|
|
`Podfile`, `Carthage/` beside a `Cartfile`, `DerivedData/`, and in a Unity
|
|
project (beside `ProjectSettings/`) `Library/`, `Temp/`, `Obj/`, `Logs/`,
|
|
`Builds/`, `UserSettings/` and the Asset Store packages in `Assets/Plugins/`.
|
|
|
|
Your own `src/drivers/` is not excluded. The scan run lists the excluded
|
|
directories under **Nicht ausgeführt** as **Herstellercode (HAL, CMSIS,
|
|
Drittanbieter)**. The excluded code stays in the SBOM and is checked for known
|
|
vulnerabilities.
|
|
|
|
## Syft -- SBOM Generation
|
|
|
|
[Syft](https://github.com/anchore/syft) is an open-source tool for generating Software Bills of Materials. It scans your repository and identifies every dependency, including:
|
|
|
|
- Package name and version
|
|
- Package manager (npm, cargo, pip, go, maven, nuget, composer, gem)
|
|
- License information
|
|
|
|
Syft output feeds into both the SBOM feature and the vulnerability scanning pipeline.
|
|
|
|
## Embedded Library Versions
|
|
|
|
Libraries copied into a firmware tree have no manifest Syft could read.
|
|
Prüfwerk recognises **FreeRTOS**, **FreeRTOS+TCP**, **lwIP**, **Mbed TLS**,
|
|
**wolfSSL** and **FatFs** and reads each version from the library's own header
|
|
(for example `task.h`, `FreeRTOS_IP.h`, lwIP's `init.h`, `ff.h`). They are added
|
|
to the SBOM with the package source `embedded` and matched against NVD by CPE.
|
|
|
|
## OSV.dev + NVD -- Vulnerability Matching
|
|
|
|
Prüfwerk matches every SBOM component directly against two public vulnerability sources (no separate scanner binary):
|
|
|
|
- [OSV.dev](https://osv.dev/) -- batch queried by package URL (purl) for ecosystem advisories (npm, PyPI, crates.io, Go, Maven, ...)
|
|
- [NVD](https://nvd.nist.gov/) -- queried per CVE for the CVSS v3.1 base score, and by CPE for components outside a package ecosystem: the CODESYS runtime found in PLC projects and the embedded libraries above. All CVEs of the product are fetched and their affected version ranges compared with the version in use.
|
|
|
|
Matches are stored as CVE alerts with CVSS scores and re-checked hourly, so newly published CVEs against an unchanged dependency still raise a notification.
|
|
|
|
Only package URLs (purl), CVE ids and CPE product prefixes are sent. Both sources are reached through the net guard like every other outbound request (see [Outbound connections](#outbound-connections-egress)).
|
|
|
|
## KEV, EPSS and Vulnrichment -- Exploitation
|
|
|
|
Every CVE alert is enriched with what is known about its exploitation, after the CVE lookup and before the alerts are stored (`pipeline/cve_enrichment.rs`):
|
|
|
|
| Source | What it says | Licence | How it is read |
|
|
|---|---|---|---|
|
|
| [CISA Known Exploited Vulnerabilities (KEV)](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) | the CVE is exploited in the wild; the date CISA added it; known use in ransomware campaigns | CC0 1.0 | the whole catalog (one JSON file, about 2 MB), at most once a day |
|
|
| [FIRST EPSS](https://www.first.org/epss) | the probability that the CVE is exploited in the next 30 days, and its percentile | free to use; FIRST asks for attribution | FIRST's API, up to 50 CVE ids per request |
|
|
| [CISA Vulnrichment](https://github.com/cisagov/vulnrichment) | the SSVC decision point *Exploitation* (`none`, `poc`, `active`) | CC0 1.0 | the CVE's record in the GitHub repository (`<year>/<n>xxx/CVE-….json`); a CVE CISA has not rated is a 404 |
|
|
|
|
The answers are attached to the alert (`exploitation`) and to the SBOM's reference to the same advisory, so the SBOM page, the evidence pack (`cve-alerts.json`), the MCP tools and the LLM triage see them. In the CVE issues of a managed repository (see [Issues](/guide/issues)) a CVE in KEV always opens an issue, rated at least high, and one whose EPSS percentile reaches `CVE_ISSUE_EPSS_PERCENTILE` (default `0.95`; `off` leaves EPSS out) is rated one step higher: a medium CVE then opens an issue as high. A finding that names a CVE gets the same facts in its triage prompt.
|
|
|
|
**Cache:** answers are kept for a day in the admin database (`<prefix>__admin`), shared by all tenants: `cve_exploitation` (one row per CVE id) and `cisa_kev` (the catalog). They are public data keyed by CVE id; nothing of the tenant is stored. A source that does not answer leaves its part unknown, is not cached and is asked again on the next scan; it never fails the scan. One scan looks up at most 500 uncached CVEs (8 Vulnrichment reads at once, 2 minutes in total).
|
|
|
|
**Attribution:** wherever an EPSS score is shown (SBOM page, CVE issues) it is credited: *EPSS: FIRST.org, Exploit Prediction Scoring System, https://www.first.org/epss*.
|
|
|
|
`CVE_EXPLOIT_LOOKUP=false` keeps the agent from contacting the three sources.
|
|
|
|
## nuget.org -- NuGet Licenses
|
|
|
|
Licenses of NuGet packages that no `.nuspec` in the tree gives are read from the [nuget.org registration API](https://learn.microsoft.com/nuget/api/registration-base-url-resource) (`api.nuget.org`). Only the package id and version are sent, never for an id a `nuget.config` routes to another feed (see [.NET projects](/guide/dotnet-en)). The lookup is bounded per scan (8 requests at once, 10 s per request, 60 s and 300 uncached packages in total); answers are cached for all tenants. Set `NUGET_LICENSE_LOOKUP=false` to keep the agent from contacting nuget.org.
|
|
|
|
## npm and Maven -- Licenses
|
|
|
|
Licenses of npm packages come from their version document on `registry.npmjs.org` (`license`, or the older `licenses` list), those of Maven and Gradle dependencies from their POM on Maven Central or, for AndroidX and Google Play services, Google's Maven repository; a POM without `<licenses>` inherits its parent's (followed up to three levels). Only names and versions are sent, never for a scope or registry the tree's `.npmrc`/`.yarnrc.yml` routes elsewhere, and no Maven name at all when a build names a repository besides the public ones. Bounded and cached like the NuGet lookup; `REGISTRY_LICENSE_LOOKUP=false` turns it off.
|
|
|
|
## ClamAV -- Malware
|
|
|
|
[ClamAV](https://www.clamav.net/) (GPL-2.0, the official image unchanged) runs
|
|
as its own service beside the agent, its signatures updated daily by freshclam
|
|
inside it. The agent streams each file of the tree to it (`INSTREAM`, at most
|
|
64 MiB per file; larger files are listed under **Nicht ausgeführt**), vendor
|
|
code included: a vendored DLL is exactly where malware hides. A file found
|
|
clean is remembered by its SHA-256 and the signature version, so a rescan only
|
|
streams what changed or met new signatures. Each hit is a finding of high
|
|
severity with the signature, the file and its SHA-256 (type **Schadsoftware und
|
|
Binärdateien**, tool **Schadsoftware (ClamAV)**). Heuristic signatures
|
|
(`Heuristics.*`, `*.Malware.*`, `PUA.*`) also match packers, obfuscators and
|
|
protection tools; such a finding says so and needs a person's review. The LLM
|
|
triage does not judge these findings (there is no code to read). Without the
|
|
service (`CLAMD_ADDRESS` unset) the stage is listed as not enabled; when the
|
|
service cannot be reached, as not completed, never as clean.
|
|
|
|
## Committed binaries
|
|
|
|
Executables, libraries and firmware images committed as built files (PE, ELF,
|
|
Mach-O, and `.hex`/`.srec`/`.uf2`/`.dfu`/raw `.bin` images, recognised by their
|
|
first bytes) are listed as informational findings (tool **Eingecheckte
|
|
Binärdateien**) with format, architecture (and `.NET` for an assembly), size,
|
|
SHA-256 and, for a Windows file, its version resource (product, version,
|
|
company, original file name). A changed file is a new finding. Many of them in
|
|
one repository become one finding listing them.
|
|
|
|
## Custom OAuth Scanner
|
|
|
|
A purpose-built scanner that detects OAuth and OIDC misconfigurations in your code, including:
|
|
|
|
- Missing state parameter validation
|
|
- Insecure token storage
|
|
- Incorrect redirect URI handling
|
|
- Missing PKCE implementation
|
|
- Token exposure in logs or URLs
|
|
|
|
## Custom GDPR Scanner
|
|
|
|
A scanner focused on data protection compliance, detecting:
|
|
|
|
- Personal data handling without consent checks
|
|
- Missing data retention policies
|
|
- Unencrypted PII storage
|
|
- Cross-border data transfer issues
|
|
|
|
## gitleaks -- Secrets
|
|
|
|
[gitleaks](https://github.com/gitleaks/gitleaks) finds hardcoded secrets and
|
|
credentials: API keys, tokens, private keys, passwords. On a git checkout it
|
|
runs `gitleaks detect`, which also looks through the repository's history; on an
|
|
uploaded archive, which has no history, it scans the files with `gitleaks dir`.
|
|
Its findings have the type **Zugangsdaten im Code** (Secrets); the dashboard
|
|
shows the secret shortened.
|
|
|
|
## PLC Control-Logic Analyser
|
|
|
|
Prüfwerk's own analyser for IEC 61131-3 programs. It parses Structured Text
|
|
(`.st`, `.scl`, `.exp`) and PLCopen XML projects, including graphical FBD/LD,
|
|
and runs CWE-mapped security rules over them, for example hardcoded credentials,
|
|
safety interlock or watchdog bypass, unchecked array indexing and insecure
|
|
protocol ports. Its findings have the type **SPS-Steuerungslogik**. See
|
|
[SPS / PLC (CODESYS)](/guide/plc).
|
|
|
|
## LLM-Powered Code Review
|
|
|
|
For pull-request reviews, Prüfwerk uses an LLM to review the changed code in several passes. A regular scan does not run it, and PR reviews need webhooks, which are not available in this release (see [Webhooks & PR Reviews](/guide/webhooks)). The review looks for issues too nuanced for static rules, such as:
|
|
|
|
- Business logic flaws
|
|
- Race conditions
|
|
- Improper error handling that leaks information
|
|
- Insecure design patterns
|
|
|
|
Code review findings are marked with the **Code Review** type.
|
|
|
|
## LLM-Powered Triage
|
|
|
|
Every new finding a scan stores -- regardless of which scanner produced it -- goes through AI triage. Here is how it works:
|
|
|
|
1. **Context gathering** -- the triage engine collects the finding details, about 50 lines of surrounding code, and information from the code knowledge graph (what calls this code, what it calls, how it connects to entry points)
|
|
|
|
2. **Severity assessment** -- the LLM evaluates the finding considering:
|
|
- The vulnerability type and its typical impact
|
|
- The specific code context (is this in a test file? behind authentication? in dead code?)
|
|
- The blast radius -- how many entry points and call chains are affected, based on the code graph
|
|
|
|
3. **Confidence scoring** -- the LLM assigns a confidence from 0 to 10. It is lowered for findings in test, example, generated or vendored files. A finding the LLM dismisses, or does not confirm with a confidence of at least 3, is set to **Zu prüfen** (needs review); it is never deleted
|
|
|
|
4. **Rationale generation** -- the LLM writes a human-readable explanation of why it assigned the severity and confidence it did
|
|
|
|
5. **Remediation guidance** -- where it can, the LLM writes a short remediation
|
|
|
|
::: tip
|
|
The AI triage is a starting point, not a final verdict. Always review the rationale and code evidence before acting on a finding. See [Understanding Findings](/guide/findings#human-in-the-loop) for more on the human-in-the-loop workflow.
|
|
:::
|
|
|
|
## Outbound connections (egress)
|
|
|
|
Every connection the agent opens, in one place. **Guarded** means: the HTTP client is built with `guarded_client_builder` (the resolver returns only addresses the net guard approves, every redirect hop is re-checked, no proxy) and the first URL is checked with `NetGuard::check_url` before it is sent. In a hardened deployment the guard refuses private, loopback, link-local and metadata addresses; `PW_ALLOW_PRIVATE_TARGETS=1` relaxes it outside hardened deployments only.
|
|
|
|
### Public data sources
|
|
|
|
| Destination | What is sent | Module | Guard | Limits | Switch |
|
|
|---|---|---|---|---|---|
|
|
| `api.osv.dev` (`/v1/querybatch`, `/v1/vulns/{id}`) | purls of SBOM components, advisory ids | `pipeline/cve.rs` | guarded | 10 s per request, 5 s connect, body ≤ 16 MiB, 8 advisory reads at once | none (CVE stage) |
|
|
| `services.nvd.nist.gov` (`/rest/json/cves/2.0`) | CVE ids (CVSS score), CPE product prefixes (CODESYS, embedded libraries) | `pipeline/cve.rs`, `pipeline/nvd_cpe.rs` | guarded | 30 s per request, 5 s connect, body ≤ 16 MiB, 3 retries after 6/12/24 s, answers cached 6 h | `NVD_API_KEY` (optional, raises NVD's rate limit) |
|
|
| `www.cisa.gov` (`/sites/default/files/feeds/known_exploited_vulnerabilities.json`) | nothing (a GET of the public catalog) | `pipeline/cve_enrichment.rs` | guarded | 10 s per request, 5 s connect, body ≤ 16 MiB; at most once a day (cached for all tenants) | `CVE_EXPLOIT_LOOKUP=false` |
|
|
| `api.first.org` (`/data/v1/epss`) | CVE ids of the alerts | `pipeline/cve_enrichment.rs` | guarded | as above, 50 CVE ids per request, 500 uncached CVEs and 2 min per scan; answers cached a day | `CVE_EXPLOIT_LOOKUP=false` |
|
|
| `raw.githubusercontent.com` (`/cisagov/vulnrichment/develop/…`) | CVE ids of the alerts (in the path) | `pipeline/cve_enrichment.rs` | guarded | as above, 8 at once | `CVE_EXPLOIT_LOOKUP=false` |
|
|
| `api.nuget.org` (registration, catalog) | NuGet package ids and versions, not for ids a `nuget.config` routes to another feed | `pipeline/sbom/nuget_license.rs` | guarded | 10 s per request, 5 s connect, body ≤ 2 MiB, 8 at once, 60 s and 300 uncached packages per scan | `NUGET_LICENSE_LOOKUP=false` |
|
|
| `registry.npmjs.org` | npm package names and versions, not for a registry or scope `.npmrc`/`.yarnrc.yml` routes elsewhere | `pipeline/sbom/registry_license.rs` | guarded | as nuget.org (bounds per scan; answers cached for all tenants) | `REGISTRY_LICENSE_LOOKUP=false` |
|
|
| `repo1.maven.org`, `dl.google.com` (POMs) | Maven group, artifact and version (and parent POMs), not when the build names a non-public repository | `pipeline/sbom/registry_license.rs` | guarded | as nuget.org | `REGISTRY_LICENSE_LOOKUP=false` |
|
|
| Package registries (Go proxy, npm, PyPI, Maven Central) | package names and versions | Syft (`pipeline/sbom/syft.rs`, remote license lookups) and lockfile generation (`npm`, `cargo`, `pip-compile` in `pipeline/sbom/mod.rs`) | not guarded: subprocesses with their own HTTP | Syft 10 min per scan | lockfile generation follows the execution policy |
|
|
|
|
### Tenant-chosen addresses
|
|
|
|
| Destination | Module | Guard |
|
|
|---|---|---|
|
|
| Git remotes (clone, fetch, submodules, linked artifacts) | `pipeline/git.rs`, `ingest/` | `check_git_url` and the resolved address before every clone and fetch; redirects off |
|
|
| Gitea API of a git source or tracker (managed Git) | `git_source/gitea.rs`, `trackers/gitea.rs` | guarded |
|
|
| DAST and pentest targets | `api/handlers/dast.rs`, `pentest/orchestrator.rs`, `compliance-dast` | base URL checked with `check_url`; the DAST tools share a guarded client |
|
|
|
|
### Operator-configured services (not guarded)
|
|
|
|
These are set by the operator in the agent's environment, not by a tenant, and often live on the platform's internal network, which the guard refuses by design. They use plain clients.
|
|
|
|
| Destination | Module | Set by |
|
|
|---|---|---|
|
|
| LLM gateway (LiteLLM) | `llm/` | `LITELLM_URL` |
|
|
| Tenant registry (entitlements, projects) | `registry.rs` | `TENANT_REGISTRY_URL` |
|
|
| breakpilot-compliance OSCAL catalog | `controls/oscal_provider.rs` | `BREAKPILOT_BASE_URL` |
|
|
| GitLab and Jira issue trackers | `trackers/gitlab.rs`, `trackers/jira.rs` | `GITLAB_URL`, `JIRA_URL` |
|
|
| Identity providers for pentest test-user cleanup (Keycloak, Auth0, Okta) | `pentest/cleanup.rs` | `KEYCLOAK_URL`, `AUTH0_DOMAIN`, `OKTA_DOMAIN` |
|
|
| Headless Chrome for PDF reports | `pentest/report/pdf.rs` | `CHROME_WS_URL` |
|
|
| MongoDB | `database.rs` | `MONGODB_URI` |
|
|
| ClamAV service (clamd, plain TCP; the tree's files are streamed to it) | `pipeline/clamav.rs` | `CLAMD_ADDRESS` |
|
|
|
|
## Planned integrations (decided 2026-08-31, not yet in the code)
|
|
|
|
The product spec keeps an **OSS-only** tooling policy and a control-mapping rule of *tools detect, the LLM judges*. Two deterministic detectors are therefore being added **underneath** the agentic DAST/pentest layer — the agents stay on top for context-seeded exploitation, chaining and explanation:
|
|
|
|
| Tool | Role | Status |
|
|
|------|------|--------|
|
|
| [Nuclei](https://github.com/projectdiscovery/nuclei) | Template-driven checks (CVE probes, default credentials, exposed panels, misconfigurations) including ICS/OT templates for WebVisu / OpenPLC / HMI endpoints. Runs as a DAST phase and as a Werkbank job with vendored templates so it works on-prem. | Planned — tracked as an issue |
|
|
| [OWASP ZAP](https://www.zaproxy.org/) | Baseline (passive) and, behind the destructive-tests flag, active scan for reproducible spider + rule coverage; results seed the pentest agent. | Planned — follows Nuclei |
|
|
|
|
Both feed the same `control-map` lookup table as Semgrep, so their findings receive compliance `control_refs` through the grounded judge. An **offline vulnerability database** (Trivy preferred, Grype as alternative) is planned for the on-prem Werkbank runner, which cannot reach the OSV.dev / NVD APIs. Until these land, DAST findings come exclusively from the in-house agents described above. |