@cyclonedx/cdxgen 12.2.0 → 12.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +242 -90
- package/bin/audit.js +191 -0
- package/bin/cdxgen.js +532 -168
- package/bin/convert.js +99 -0
- package/bin/evinse.js +23 -0
- package/bin/repl.js +339 -8
- package/bin/sign.js +8 -0
- package/bin/validate.js +8 -0
- package/bin/verify.js +8 -0
- package/data/container-knowledge-index.json +125 -0
- package/data/gtfobins-index.json +6296 -0
- package/data/lolbas-index.json +150 -0
- package/data/queries-darwin.json +63 -3
- package/data/queries-win.json +45 -3
- package/data/queries.json +74 -2
- package/data/rules/chrome-extensions.yaml +240 -0
- package/data/rules/ci-permissions.yaml +478 -18
- package/data/rules/container-risk.yaml +270 -0
- package/data/rules/obom-runtime.yaml +891 -0
- package/data/rules/package-integrity.yaml +49 -0
- package/data/spdx-export.schema.json +6794 -0
- package/data/spdx-model-v3.0.1.jsonld +15999 -0
- package/lib/audit/index.js +1924 -0
- package/lib/audit/index.poku.js +1488 -0
- package/lib/audit/progress.js +137 -0
- package/lib/audit/progress.poku.js +188 -0
- package/lib/audit/reporters.js +618 -0
- package/lib/audit/scoring.js +310 -0
- package/lib/audit/scoring.poku.js +341 -0
- package/lib/audit/targets.js +260 -0
- package/lib/audit/targets.poku.js +331 -0
- package/lib/cli/index.js +276 -68
- package/lib/cli/index.poku.js +368 -0
- package/lib/helpers/analyzer.js +1052 -5
- package/lib/helpers/analyzer.poku.js +301 -0
- package/lib/helpers/annotationFormatter.js +49 -0
- package/lib/helpers/annotationFormatter.poku.js +44 -0
- package/lib/helpers/bomUtils.js +36 -0
- package/lib/helpers/bomUtils.poku.js +51 -0
- package/lib/helpers/caxa.js +2 -2
- package/lib/helpers/chromextutils.js +1153 -0
- package/lib/helpers/chromextutils.poku.js +493 -0
- package/lib/helpers/ciParsers/githubActions.js +1632 -45
- package/lib/helpers/ciParsers/githubActions.poku.js +853 -1
- package/lib/helpers/containerRisk.js +186 -0
- package/lib/helpers/containerRisk.poku.js +52 -0
- package/lib/helpers/depsUtils.js +16 -0
- package/lib/helpers/depsUtils.poku.js +58 -1
- package/lib/helpers/display.js +245 -61
- package/lib/helpers/display.poku.js +162 -2
- package/lib/helpers/exportUtils.js +123 -0
- package/lib/helpers/exportUtils.poku.js +60 -0
- package/lib/helpers/formulationParsers.js +69 -0
- package/lib/helpers/formulationParsers.poku.js +44 -0
- package/lib/helpers/gtfobins.js +189 -0
- package/lib/helpers/gtfobins.poku.js +49 -0
- package/lib/helpers/lolbas.js +267 -0
- package/lib/helpers/lolbas.poku.js +39 -0
- package/lib/helpers/osqueryTransform.js +84 -0
- package/lib/helpers/osqueryTransform.poku.js +49 -0
- package/lib/helpers/provenanceUtils.js +193 -0
- package/lib/helpers/provenanceUtils.poku.js +145 -0
- package/lib/helpers/pylockutils.js +281 -0
- package/lib/helpers/pylockutils.poku.js +48 -0
- package/lib/helpers/registryProvenance.js +793 -0
- package/lib/helpers/registryProvenance.poku.js +452 -0
- package/lib/helpers/remote/dependency-track.js +84 -0
- package/lib/helpers/remote/dependency-track.poku.js +119 -0
- package/lib/helpers/source.js +1267 -0
- package/lib/helpers/source.poku.js +771 -0
- package/lib/helpers/spdxUtils.js +97 -0
- package/lib/helpers/spdxUtils.poku.js +70 -0
- package/lib/helpers/table.js +384 -0
- package/lib/helpers/table.poku.js +186 -0
- package/lib/helpers/unicodeScan.js +147 -0
- package/lib/helpers/unicodeScan.poku.js +45 -0
- package/lib/helpers/utils.js +882 -136
- package/lib/helpers/utils.poku.js +995 -91
- package/lib/managers/binary.js +29 -5
- package/lib/managers/docker.js +179 -52
- package/lib/managers/docker.poku.js +327 -28
- package/lib/managers/oci.js +107 -23
- package/lib/managers/oci.poku.js +132 -0
- package/lib/server/openapi.yaml +50 -0
- package/lib/server/server.js +228 -331
- package/lib/server/server.poku.js +220 -5
- package/lib/stages/postgen/annotator.js +7 -0
- package/lib/stages/postgen/annotator.poku.js +40 -0
- package/lib/stages/postgen/auditBom.js +20 -5
- package/lib/stages/postgen/auditBom.poku.js +1729 -67
- package/lib/stages/postgen/postgen.js +40 -0
- package/lib/stages/postgen/postgen.poku.js +47 -0
- package/lib/stages/postgen/ruleEngine.js +80 -2
- package/lib/stages/postgen/spdxConverter.js +796 -0
- package/lib/stages/postgen/spdxConverter.poku.js +341 -0
- package/lib/validator/bomValidator.js +232 -0
- package/lib/validator/bomValidator.poku.js +70 -0
- package/lib/validator/complianceRules.js +70 -7
- package/lib/validator/complianceRules.poku.js +30 -0
- package/lib/validator/reporters/annotations.js +2 -2
- package/lib/validator/reporters/console.js +13 -2
- package/lib/validator/reporters.poku.js +13 -0
- package/package.json +10 -8
- package/types/bin/audit.d.ts +3 -0
- package/types/bin/audit.d.ts.map +1 -0
- package/types/bin/convert.d.ts +3 -0
- package/types/bin/convert.d.ts.map +1 -0
- package/types/bin/repl.d.ts.map +1 -1
- package/types/lib/audit/index.d.ts +115 -0
- package/types/lib/audit/index.d.ts.map +1 -0
- package/types/lib/audit/progress.d.ts +27 -0
- package/types/lib/audit/progress.d.ts.map +1 -0
- package/types/lib/audit/reporters.d.ts +35 -0
- package/types/lib/audit/reporters.d.ts.map +1 -0
- package/types/lib/audit/scoring.d.ts +35 -0
- package/types/lib/audit/scoring.d.ts.map +1 -0
- package/types/lib/audit/targets.d.ts +63 -0
- package/types/lib/audit/targets.d.ts.map +1 -0
- package/types/lib/cli/index.d.ts +8 -0
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/helpers/analyzer.d.ts +13 -0
- package/types/lib/helpers/analyzer.d.ts.map +1 -1
- package/types/lib/helpers/annotationFormatter.d.ts +23 -0
- package/types/lib/helpers/annotationFormatter.d.ts.map +1 -0
- package/types/lib/helpers/bomUtils.d.ts +5 -0
- package/types/lib/helpers/bomUtils.d.ts.map +1 -0
- package/types/lib/helpers/chromextutils.d.ts +97 -0
- package/types/lib/helpers/chromextutils.d.ts.map +1 -0
- package/types/lib/helpers/ciParsers/githubActions.d.ts +3 -8
- package/types/lib/helpers/ciParsers/githubActions.d.ts.map +1 -1
- package/types/lib/helpers/containerRisk.d.ts +17 -0
- package/types/lib/helpers/containerRisk.d.ts.map +1 -0
- package/types/lib/helpers/depsUtils.d.ts.map +1 -1
- package/types/lib/helpers/display.d.ts +4 -1
- package/types/lib/helpers/display.d.ts.map +1 -1
- package/types/lib/helpers/exportUtils.d.ts +40 -0
- package/types/lib/helpers/exportUtils.d.ts.map +1 -0
- package/types/lib/helpers/formulationParsers.d.ts.map +1 -1
- package/types/lib/helpers/gtfobins.d.ts +17 -0
- package/types/lib/helpers/gtfobins.d.ts.map +1 -0
- package/types/lib/helpers/lolbas.d.ts +16 -0
- package/types/lib/helpers/lolbas.d.ts.map +1 -0
- package/types/lib/helpers/osqueryTransform.d.ts +7 -0
- package/types/lib/helpers/osqueryTransform.d.ts.map +1 -0
- package/types/lib/helpers/provenanceUtils.d.ts +90 -0
- package/types/lib/helpers/provenanceUtils.d.ts.map +1 -0
- package/types/lib/helpers/pylockutils.d.ts +51 -0
- package/types/lib/helpers/pylockutils.d.ts.map +1 -0
- package/types/lib/helpers/registryProvenance.d.ts +17 -0
- package/types/lib/helpers/registryProvenance.d.ts.map +1 -0
- package/types/lib/helpers/remote/dependency-track.d.ts +16 -0
- package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -0
- package/types/lib/helpers/source.d.ts +141 -0
- package/types/lib/helpers/source.d.ts.map +1 -0
- package/types/lib/helpers/spdxUtils.d.ts +2 -0
- package/types/lib/helpers/spdxUtils.d.ts.map +1 -0
- package/types/lib/helpers/table.d.ts +6 -0
- package/types/lib/helpers/table.d.ts.map +1 -0
- package/types/lib/helpers/unicodeScan.d.ts +46 -0
- package/types/lib/helpers/unicodeScan.d.ts.map +1 -0
- package/types/lib/helpers/utils.d.ts +30 -11
- package/types/lib/helpers/utils.d.ts.map +1 -1
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/managers/oci.d.ts.map +1 -1
- package/types/lib/server/server.d.ts +0 -35
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
- package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/postgen/spdxConverter.d.ts +11 -0
- package/types/lib/stages/postgen/spdxConverter.d.ts.map +1 -0
- package/types/lib/validator/bomValidator.d.ts +1 -0
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/complianceRules.d.ts.map +1 -1
- package/types/lib/validator/reporters/console.d.ts.map +1 -1
- package/types/bin/dependencies.d.ts +0 -3
- package/types/bin/dependencies.d.ts.map +0 -1
- package/types/bin/licenses.d.ts +0 -3
- package/types/bin/licenses.d.ts.map +0 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
- id: CTR-001
|
|
2
|
+
name: "Container image ships setuid/setgid GTFOBins execution primitive"
|
|
3
|
+
description: "Known GTFOBins execution helpers become materially riskier when the image keeps the binary setuid or setgid."
|
|
4
|
+
severity: critical
|
|
5
|
+
category: container-risk
|
|
6
|
+
condition: |
|
|
7
|
+
components[
|
|
8
|
+
$prop($, 'cdx:gtfobins:matched') = 'true'
|
|
9
|
+
and (
|
|
10
|
+
$listContains($prop($, 'cdx:gtfobins:functions'), 'shell')
|
|
11
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'command')
|
|
12
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'reverse-shell')
|
|
13
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'bind-shell')
|
|
14
|
+
)
|
|
15
|
+
and (
|
|
16
|
+
$prop($, 'internal:has_setuid') = 'true'
|
|
17
|
+
or $prop($, 'internal:has_setgid') = 'true'
|
|
18
|
+
)
|
|
19
|
+
]
|
|
20
|
+
location: |
|
|
21
|
+
{
|
|
22
|
+
"bomRef": $."bom-ref",
|
|
23
|
+
"purl": purl,
|
|
24
|
+
"file": $prop($, 'SrcFile')
|
|
25
|
+
}
|
|
26
|
+
message: "Executable '{{ name }}' at '{{ $prop($, 'SrcFile') }}' combines GTFOBins execution features with setuid/setgid permissions"
|
|
27
|
+
mitigation: "Remove the setuid/setgid bit, replace the image with a slimmer base, and keep container privilege boundaries strict (no host mounts, no privileged mode, no extra capabilities)."
|
|
28
|
+
attack:
|
|
29
|
+
tactics: [TA0004, TA0008]
|
|
30
|
+
techniques: [T1548, T1611]
|
|
31
|
+
evidence: |
|
|
32
|
+
{
|
|
33
|
+
"canonicalName": $prop($, 'cdx:gtfobins:name'),
|
|
34
|
+
"functions": $prop($, 'cdx:gtfobins:functions'),
|
|
35
|
+
"contexts": $prop($, 'cdx:gtfobins:contexts'),
|
|
36
|
+
"riskTags": $prop($, 'cdx:gtfobins:riskTags'),
|
|
37
|
+
"srcFile": $prop($, 'SrcFile'),
|
|
38
|
+
"reference": $prop($, 'cdx:gtfobins:reference')
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
- id: CTR-002
|
|
42
|
+
name: "Container image includes privileged container-escape helper"
|
|
43
|
+
description: "Container runtime or namespace-management helpers that are already classified as GTFOBins can accelerate container breakout when runtime isolation is weakened."
|
|
44
|
+
severity: critical
|
|
45
|
+
category: container-risk
|
|
46
|
+
condition: |
|
|
47
|
+
components[
|
|
48
|
+
$prop($, 'cdx:gtfobins:matched') = 'true'
|
|
49
|
+
and $listContains($prop($, 'cdx:gtfobins:riskTags'), 'container-escape')
|
|
50
|
+
and (
|
|
51
|
+
$prop($, 'internal:has_setuid') = 'true'
|
|
52
|
+
or $prop($, 'internal:has_setgid') = 'true'
|
|
53
|
+
or $listContains($prop($, 'cdx:gtfobins:privilegedContexts'), 'capabilities')
|
|
54
|
+
)
|
|
55
|
+
]
|
|
56
|
+
location: |
|
|
57
|
+
{
|
|
58
|
+
"bomRef": $."bom-ref",
|
|
59
|
+
"purl": purl,
|
|
60
|
+
"file": $prop($, 'SrcFile')
|
|
61
|
+
}
|
|
62
|
+
message: "Container-escape helper '{{ name }}' is present at '{{ $prop($, 'SrcFile') }}' with elevated execution semantics"
|
|
63
|
+
mitigation: "Remove container runtime and namespace-management tooling from application images, avoid CAP_SYS_ADMIN-like capability grants, and block access to the Docker/containerd sockets."
|
|
64
|
+
attack:
|
|
65
|
+
tactics: [TA0004, TA0008]
|
|
66
|
+
techniques: [T1611]
|
|
67
|
+
evidence: |
|
|
68
|
+
{
|
|
69
|
+
"canonicalName": $prop($, 'cdx:gtfobins:name'),
|
|
70
|
+
"privilegedContexts": $prop($, 'cdx:gtfobins:privilegedContexts'),
|
|
71
|
+
"riskTags": $prop($, 'cdx:gtfobins:riskTags'),
|
|
72
|
+
"srcFile": $prop($, 'SrcFile')
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
- id: CTR-003
|
|
76
|
+
name: "Container image includes privileged GTFOBins library-load or escalation primitive"
|
|
77
|
+
description: "GTFOBins entries that can load attacker-controlled shared libraries or directly escalate privileges are strong hardening failures in container images."
|
|
78
|
+
severity: high
|
|
79
|
+
category: container-risk
|
|
80
|
+
condition: |
|
|
81
|
+
components[
|
|
82
|
+
$prop($, 'cdx:gtfobins:matched') = 'true'
|
|
83
|
+
and (
|
|
84
|
+
$listContains($prop($, 'cdx:gtfobins:functions'), 'library-load')
|
|
85
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'privilege-escalation')
|
|
86
|
+
)
|
|
87
|
+
and (
|
|
88
|
+
$prop($, 'internal:has_setuid') = 'true'
|
|
89
|
+
or $prop($, 'internal:has_setgid') = 'true'
|
|
90
|
+
or $listContains($prop($, 'cdx:gtfobins:privilegedContexts'), 'sudo')
|
|
91
|
+
or $listContains($prop($, 'cdx:gtfobins:privilegedContexts'), 'suid')
|
|
92
|
+
or $listContains($prop($, 'cdx:gtfobins:privilegedContexts'), 'capabilities')
|
|
93
|
+
)
|
|
94
|
+
]
|
|
95
|
+
location: |
|
|
96
|
+
{
|
|
97
|
+
"bomRef": $."bom-ref",
|
|
98
|
+
"purl": purl,
|
|
99
|
+
"file": $prop($, 'SrcFile')
|
|
100
|
+
}
|
|
101
|
+
message: "Binary '{{ name }}' exposes GTFOBins privilege-escalation or library-load behavior in a privileged execution context"
|
|
102
|
+
mitigation: "Remove the helper from the image where possible, strip privileged bits/capabilities, and keep writable mounts away from privileged processes."
|
|
103
|
+
attack:
|
|
104
|
+
tactics: [TA0003, TA0004]
|
|
105
|
+
techniques: [T1574, T1548]
|
|
106
|
+
evidence: |
|
|
107
|
+
{
|
|
108
|
+
"canonicalName": $prop($, 'cdx:gtfobins:name'),
|
|
109
|
+
"functions": $prop($, 'cdx:gtfobins:functions'),
|
|
110
|
+
"privilegedContexts": $prop($, 'cdx:gtfobins:privilegedContexts'),
|
|
111
|
+
"srcFile": $prop($, 'SrcFile')
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
- id: CTR-004
|
|
115
|
+
name: "Container image retains privileged GTFOBins exfiltration primitive"
|
|
116
|
+
description: "A GTFOBins helper that can read local files or upload data becomes especially dangerous when it also runs with setuid/setgid or other elevated contexts."
|
|
117
|
+
severity: high
|
|
118
|
+
category: container-risk
|
|
119
|
+
condition: |
|
|
120
|
+
components[
|
|
121
|
+
$prop($, 'cdx:gtfobins:matched') = 'true'
|
|
122
|
+
and (
|
|
123
|
+
$listContains($prop($, 'cdx:gtfobins:riskTags'), 'data-exfiltration')
|
|
124
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'upload')
|
|
125
|
+
)
|
|
126
|
+
and (
|
|
127
|
+
$prop($, 'internal:has_setuid') = 'true'
|
|
128
|
+
or $prop($, 'internal:has_setgid') = 'true'
|
|
129
|
+
or $listContains($prop($, 'cdx:gtfobins:privilegedContexts'), 'sudo')
|
|
130
|
+
or $listContains($prop($, 'cdx:gtfobins:privilegedContexts'), 'suid')
|
|
131
|
+
or $listContains($prop($, 'cdx:gtfobins:privilegedContexts'), 'capabilities')
|
|
132
|
+
)
|
|
133
|
+
]
|
|
134
|
+
location: |
|
|
135
|
+
{
|
|
136
|
+
"bomRef": $."bom-ref",
|
|
137
|
+
"purl": purl,
|
|
138
|
+
"file": $prop($, 'SrcFile')
|
|
139
|
+
}
|
|
140
|
+
message: "Binary '{{ name }}' can read or exfiltrate local data from a privileged execution path"
|
|
141
|
+
mitigation: "Drop privileged bits, keep secrets off the image filesystem, and remove unnecessary upload/file-read helpers from runtime images."
|
|
142
|
+
attack:
|
|
143
|
+
tactics: [TA0006, TA0010]
|
|
144
|
+
techniques: [T1005, T1041]
|
|
145
|
+
evidence: |
|
|
146
|
+
{
|
|
147
|
+
"canonicalName": $prop($, 'cdx:gtfobins:name'),
|
|
148
|
+
"functions": $prop($, 'cdx:gtfobins:functions'),
|
|
149
|
+
"privilegedContexts": $prop($, 'cdx:gtfobins:privilegedContexts'),
|
|
150
|
+
"srcFile": $prop($, 'SrcFile')
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
- id: CTR-005
|
|
154
|
+
name: "Container image includes mutable-path GTFOBins remote-execution helper"
|
|
155
|
+
description: "Remote-execution-capable GTFOBins helpers under mutable or non-standard image paths often indicate an avoidable attack toolkit or image tampering."
|
|
156
|
+
severity: medium
|
|
157
|
+
category: container-risk
|
|
158
|
+
condition: |
|
|
159
|
+
components[
|
|
160
|
+
$prop($, 'cdx:gtfobins:matched') = 'true'
|
|
161
|
+
and (
|
|
162
|
+
$listContains($prop($, 'cdx:gtfobins:functions'), 'reverse-shell')
|
|
163
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'bind-shell')
|
|
164
|
+
or (
|
|
165
|
+
(
|
|
166
|
+
$listContains($prop($, 'cdx:gtfobins:functions'), 'shell')
|
|
167
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'command')
|
|
168
|
+
)
|
|
169
|
+
and (
|
|
170
|
+
$listContains($prop($, 'cdx:gtfobins:functions'), 'upload')
|
|
171
|
+
or $listContains($prop($, 'cdx:gtfobins:functions'), 'download')
|
|
172
|
+
)
|
|
173
|
+
)
|
|
174
|
+
)
|
|
175
|
+
and (
|
|
176
|
+
$startsWith($prop($, 'SrcFile'), '/usr/local/')
|
|
177
|
+
or $startsWith($prop($, 'SrcFile'), '/opt/')
|
|
178
|
+
or $startsWith($prop($, 'SrcFile'), '/app/')
|
|
179
|
+
or $startsWith($prop($, 'SrcFile'), '/tmp/')
|
|
180
|
+
or $startsWith($prop($, 'SrcFile'), '/var/tmp/')
|
|
181
|
+
or $startsWith($prop($, 'SrcFile'), '/root/')
|
|
182
|
+
or $startsWith($prop($, 'SrcFile'), '/home/')
|
|
183
|
+
)
|
|
184
|
+
]
|
|
185
|
+
location: |
|
|
186
|
+
{
|
|
187
|
+
"bomRef": $."bom-ref",
|
|
188
|
+
"purl": purl,
|
|
189
|
+
"file": $prop($, 'SrcFile')
|
|
190
|
+
}
|
|
191
|
+
message: "GTFOBins remote-execution helper '{{ name }}' is present in mutable image path '{{ $prop($, 'SrcFile') }}'"
|
|
192
|
+
mitigation: "Keep runtime images immutable and minimal, move administrative tooling to separate debug images, and investigate how the helper entered the image."
|
|
193
|
+
attack:
|
|
194
|
+
tactics: [TA0001, TA0008]
|
|
195
|
+
techniques: [T1105, T1570]
|
|
196
|
+
evidence: |
|
|
197
|
+
{
|
|
198
|
+
"canonicalName": $prop($, 'cdx:gtfobins:name'),
|
|
199
|
+
"functions": $prop($, 'cdx:gtfobins:functions'),
|
|
200
|
+
"riskTags": $prop($, 'cdx:gtfobins:riskTags'),
|
|
201
|
+
"srcFile": $prop($, 'SrcFile')
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
- id: CTR-006
|
|
205
|
+
name: "Container image ships dedicated offensive container toolkit"
|
|
206
|
+
description: "Dedicated container or Kubernetes intrusion toolkits such as Peirates, CDK, or DEEPCE should not ship inside production runtime images."
|
|
207
|
+
severity: high
|
|
208
|
+
category: container-risk
|
|
209
|
+
condition: |
|
|
210
|
+
components[
|
|
211
|
+
$prop($, 'cdx:container:matched') = 'true'
|
|
212
|
+
and $listContains($prop($, 'cdx:container:riskTags'), 'offensive-toolkit')
|
|
213
|
+
]
|
|
214
|
+
location: |
|
|
215
|
+
{
|
|
216
|
+
"bomRef": $."bom-ref",
|
|
217
|
+
"purl": purl,
|
|
218
|
+
"file": $prop($, 'SrcFile')
|
|
219
|
+
}
|
|
220
|
+
message: "Dedicated offensive toolkit '{{ name }}' is present at '{{ $prop($, 'SrcFile') }}'"
|
|
221
|
+
mitigation: "Remove offensive testing binaries from runtime images, rebuild from a minimal trusted base, and keep container debugging or red-team tooling in separate break-glass images."
|
|
222
|
+
attack:
|
|
223
|
+
tactics: [TA0003, TA0004, TA0006, TA0007, TA0008]
|
|
224
|
+
techniques: [T1552.007, T1609, T1611, T1613]
|
|
225
|
+
evidence: |
|
|
226
|
+
{
|
|
227
|
+
"canonicalName": $prop($, 'cdx:container:name'),
|
|
228
|
+
"offenseTools": $prop($, 'cdx:container:offenseTools'),
|
|
229
|
+
"riskTags": $prop($, 'cdx:container:riskTags'),
|
|
230
|
+
"attackTechniques": $prop($, 'cdx:container:attackTechniques'),
|
|
231
|
+
"knowledgeSources": $prop($, 'cdx:container:knowledgeSources'),
|
|
232
|
+
"srcFile": $prop($, 'SrcFile')
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
- id: CTR-007
|
|
236
|
+
name: "Container image includes seccomp-sensitive namespace escape helper"
|
|
237
|
+
description: "Helpers that rely on syscalls blocked by Docker's default seccomp profile become materially riskier when operators use `seccomp=unconfined` or permissive custom profiles."
|
|
238
|
+
severity: medium
|
|
239
|
+
category: container-risk
|
|
240
|
+
condition: |
|
|
241
|
+
components[
|
|
242
|
+
$prop($, 'cdx:container:matched') = 'true'
|
|
243
|
+
and $prop($, 'cdx:container:seccompProfile') = 'docker-default'
|
|
244
|
+
and $prop($, 'cdx:container:seccompBlockedSyscalls') != ''
|
|
245
|
+
and (
|
|
246
|
+
$listContains($prop($, 'cdx:container:riskTags'), 'container-escape')
|
|
247
|
+
or $listContains($prop($, 'cdx:container:riskTags'), 'namespace-escape')
|
|
248
|
+
)
|
|
249
|
+
]
|
|
250
|
+
location: |
|
|
251
|
+
{
|
|
252
|
+
"bomRef": $."bom-ref",
|
|
253
|
+
"purl": purl,
|
|
254
|
+
"file": $prop($, 'SrcFile')
|
|
255
|
+
}
|
|
256
|
+
message: "Seccomp-sensitive escape helper '{{ name }}' is present at '{{ $prop($, 'SrcFile') }}' and depends on syscalls blocked by the Docker default seccomp profile"
|
|
257
|
+
mitigation: "Keep Docker or OCI runtimes on the default seccomp profile, never use `seccomp=unconfined` for app workloads, and review custom profiles so they do not allow namespace or host-escape syscalls without a clear need."
|
|
258
|
+
attack:
|
|
259
|
+
tactics: [TA0004, TA0008]
|
|
260
|
+
techniques: [T1611]
|
|
261
|
+
evidence: |
|
|
262
|
+
{
|
|
263
|
+
"canonicalName": $prop($, 'cdx:container:name'),
|
|
264
|
+
"offenseTools": $prop($, 'cdx:container:offenseTools'),
|
|
265
|
+
"riskTags": $prop($, 'cdx:container:riskTags'),
|
|
266
|
+
"seccompProfile": $prop($, 'cdx:container:seccompProfile'),
|
|
267
|
+
"seccompBlockedSyscalls": $prop($, 'cdx:container:seccompBlockedSyscalls'),
|
|
268
|
+
"knowledgeSources": $prop($, 'cdx:container:knowledgeSources'),
|
|
269
|
+
"srcFile": $prop($, 'SrcFile')
|
|
270
|
+
}
|