@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,240 @@
|
|
|
1
|
+
# Chrome Extension Security Rules
|
|
2
|
+
# Category: chrome-extension
|
|
3
|
+
# Evaluates Chromium browser extensions for risky permissions and execution posture
|
|
4
|
+
|
|
5
|
+
- id: CHE-001
|
|
6
|
+
name: "Extension with broad host access"
|
|
7
|
+
description: "Browser extensions with <all_urls> or wildcard host permissions can access and manipulate content on most websites"
|
|
8
|
+
severity: high
|
|
9
|
+
category: chrome-extension
|
|
10
|
+
condition: |
|
|
11
|
+
components[
|
|
12
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
13
|
+
and (
|
|
14
|
+
$listContains($propList($, 'cdx:chrome-extension:permissions'), '<all_urls>')
|
|
15
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '<all_urls>')
|
|
16
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '*://*/*')
|
|
17
|
+
)
|
|
18
|
+
]
|
|
19
|
+
location: |
|
|
20
|
+
{
|
|
21
|
+
"bomRef": $. "bom-ref",
|
|
22
|
+
"purl": purl,
|
|
23
|
+
"srcFile": $prop($, 'SrcFile')
|
|
24
|
+
}
|
|
25
|
+
message: "Chrome extension '{{ name }}@{{ version }}' has broad host access permissions"
|
|
26
|
+
mitigation: "Limit host permissions to required domains; avoid <all_urls> and broad wildcard host patterns"
|
|
27
|
+
evidence: |
|
|
28
|
+
{
|
|
29
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
30
|
+
"hostPermissions": $prop($, 'cdx:chrome-extension:hostPermissions')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
- id: CHE-002
|
|
34
|
+
name: "Extension with network interception capabilities"
|
|
35
|
+
description: "Extensions that combine webRequest and webRequestBlocking can intercept and modify browser network traffic"
|
|
36
|
+
severity: critical
|
|
37
|
+
category: chrome-extension
|
|
38
|
+
condition: |
|
|
39
|
+
components[
|
|
40
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
41
|
+
and $listContains($propList($, 'cdx:chrome-extension:permissions'), 'webRequest')
|
|
42
|
+
and $listContains($propList($, 'cdx:chrome-extension:permissions'), 'webRequestBlocking')
|
|
43
|
+
]
|
|
44
|
+
location: |
|
|
45
|
+
{
|
|
46
|
+
"bomRef": $. "bom-ref",
|
|
47
|
+
"purl": purl,
|
|
48
|
+
"srcFile": $prop($, 'SrcFile')
|
|
49
|
+
}
|
|
50
|
+
message: "Chrome extension '{{ name }}@{{ version }}' can intercept and block web requests"
|
|
51
|
+
mitigation: "Review extension code for request filtering/modification logic; restrict deployment to trusted publishers"
|
|
52
|
+
evidence: |
|
|
53
|
+
{
|
|
54
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
55
|
+
"contentScriptsRunAt": $prop($, 'cdx:chrome-extension:contentScriptsRunAt')
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
- id: CHE-003
|
|
59
|
+
name: "Always-early content scripts with broad access"
|
|
60
|
+
description: "Extensions injecting content scripts at document_start together with broad host permissions increase pre-DOM execution risk"
|
|
61
|
+
severity: high
|
|
62
|
+
category: chrome-extension
|
|
63
|
+
condition: |
|
|
64
|
+
components[
|
|
65
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
66
|
+
and $listContains($propList($, 'cdx:chrome-extension:contentScriptsRunAt'), 'document_start')
|
|
67
|
+
and (
|
|
68
|
+
$listContains($propList($, 'cdx:chrome-extension:permissions'), '<all_urls>')
|
|
69
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '<all_urls>')
|
|
70
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '*://*/*')
|
|
71
|
+
)
|
|
72
|
+
]
|
|
73
|
+
location: |
|
|
74
|
+
{
|
|
75
|
+
"bomRef": $. "bom-ref",
|
|
76
|
+
"purl": purl
|
|
77
|
+
}
|
|
78
|
+
message: "Chrome extension '{{ name }}@{{ version }}' injects scripts at document_start with broad site access"
|
|
79
|
+
mitigation: "Prefer run_at=document_idle where possible and scope host permissions to explicit trusted origins"
|
|
80
|
+
evidence: |
|
|
81
|
+
{
|
|
82
|
+
"contentScriptsRunAt": $prop($, 'cdx:chrome-extension:contentScriptsRunAt'),
|
|
83
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
84
|
+
"hostPermissions": $prop($, 'cdx:chrome-extension:hostPermissions')
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
- id: CHE-004
|
|
88
|
+
name: "Autofill-capable extension with broad host permissions"
|
|
89
|
+
description: "Autofill features handling credential or PII flows should be reviewed when broad host permissions are granted"
|
|
90
|
+
severity: medium
|
|
91
|
+
category: chrome-extension
|
|
92
|
+
condition: |
|
|
93
|
+
components[
|
|
94
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
95
|
+
and $propBool($, 'cdx:chrome-extension:hasAutofill') = true
|
|
96
|
+
and (
|
|
97
|
+
$listContains($propList($, 'cdx:chrome-extension:permissions'), '<all_urls>')
|
|
98
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '<all_urls>')
|
|
99
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '*://*/*')
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
location: |
|
|
103
|
+
{
|
|
104
|
+
"bomRef": $. "bom-ref",
|
|
105
|
+
"purl": purl
|
|
106
|
+
}
|
|
107
|
+
message: "Autofill-capable extension '{{ name }}@{{ version }}' has broad host access"
|
|
108
|
+
mitigation: "Review autofill data handling and origin checks; enforce least-privilege host permissions"
|
|
109
|
+
evidence: |
|
|
110
|
+
{
|
|
111
|
+
"hasAutofill": $prop($, 'cdx:chrome-extension:hasAutofill'),
|
|
112
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
113
|
+
"hostPermissions": $prop($, 'cdx:chrome-extension:hostPermissions'),
|
|
114
|
+
"storageManagedSchema": $prop($, 'cdx:chrome-extension:storageManagedSchema')
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
- id: CHE-005
|
|
118
|
+
name: "Extension with file/device capability and broad host scope"
|
|
119
|
+
description: "Extensions requesting file or device-adjacent capabilities alongside broad host scope can increase data collection and exfiltration risk."
|
|
120
|
+
severity: high
|
|
121
|
+
category: chrome-extension
|
|
122
|
+
condition: |
|
|
123
|
+
components[
|
|
124
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
125
|
+
and (
|
|
126
|
+
$propBool($, 'cdx:chrome-extension:capability:fileAccess') = true
|
|
127
|
+
or $propBool($, 'cdx:chrome-extension:capability:deviceAccess') = true
|
|
128
|
+
or $propBool($, 'cdx:chrome-extension:capability:bluetooth') = true
|
|
129
|
+
)
|
|
130
|
+
and (
|
|
131
|
+
$listContains($propList($, 'cdx:chrome-extension:permissions'), '<all_urls>')
|
|
132
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '<all_urls>')
|
|
133
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '*://*/*')
|
|
134
|
+
)
|
|
135
|
+
]
|
|
136
|
+
location: |
|
|
137
|
+
{
|
|
138
|
+
"bomRef": $. "bom-ref",
|
|
139
|
+
"purl": purl,
|
|
140
|
+
"srcFile": $prop($, 'SrcFile')
|
|
141
|
+
}
|
|
142
|
+
message: "Chrome extension '{{ name }}@{{ version }}' combines broad host scope with file/device capabilities"
|
|
143
|
+
mitigation: "Review whether file/device permissions are required and narrow host permissions to explicit trusted origins."
|
|
144
|
+
evidence: |
|
|
145
|
+
{
|
|
146
|
+
"capabilities": $prop($, 'cdx:chrome-extension:capabilities'),
|
|
147
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
148
|
+
"hostPermissions": $prop($, 'cdx:chrome-extension:hostPermissions')
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
- id: CHE-006
|
|
152
|
+
name: "Code-injecting extension with broad host scope"
|
|
153
|
+
description: "Extensions with explicit code-injection capability and broad host scope may execute arbitrary script logic across many origins."
|
|
154
|
+
severity: critical
|
|
155
|
+
category: chrome-extension
|
|
156
|
+
condition: |
|
|
157
|
+
components[
|
|
158
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
159
|
+
and $propBool($, 'cdx:chrome-extension:capability:codeInjection') = true
|
|
160
|
+
and (
|
|
161
|
+
$listContains($propList($, 'cdx:chrome-extension:permissions'), '<all_urls>')
|
|
162
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '<all_urls>')
|
|
163
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '*://*/*')
|
|
164
|
+
)
|
|
165
|
+
]
|
|
166
|
+
location: |
|
|
167
|
+
{
|
|
168
|
+
"bomRef": $. "bom-ref",
|
|
169
|
+
"purl": purl,
|
|
170
|
+
"srcFile": $prop($, 'SrcFile')
|
|
171
|
+
}
|
|
172
|
+
message: "Chrome extension '{{ name }}@{{ version }}' has code-injection capability with broad host coverage"
|
|
173
|
+
mitigation: "Constrain host permissions and validate code-injection paths (scripting/tabs/debugger/content scripts) against strict allowlists."
|
|
174
|
+
evidence: |
|
|
175
|
+
{
|
|
176
|
+
"capabilities": $prop($, 'cdx:chrome-extension:capabilities'),
|
|
177
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
178
|
+
"contentScriptsRunAt": $prop($, 'cdx:chrome-extension:contentScriptsRunAt')
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
- id: CHE-007
|
|
182
|
+
name: "Fingerprinting-capable extension with broad host scope"
|
|
183
|
+
description: "Fingerprinting-related capability indicators combined with broad host access can increase tracking and privacy risk."
|
|
184
|
+
severity: high
|
|
185
|
+
category: chrome-extension
|
|
186
|
+
condition: |
|
|
187
|
+
components[
|
|
188
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
189
|
+
and $propBool($, 'cdx:chrome-extension:capability:fingerprinting') = true
|
|
190
|
+
and (
|
|
191
|
+
$listContains($propList($, 'cdx:chrome-extension:permissions'), '<all_urls>')
|
|
192
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '<all_urls>')
|
|
193
|
+
or $listContains($propList($, 'cdx:chrome-extension:hostPermissions'), '*://*/*')
|
|
194
|
+
)
|
|
195
|
+
]
|
|
196
|
+
location: |
|
|
197
|
+
{
|
|
198
|
+
"bomRef": $. "bom-ref",
|
|
199
|
+
"purl": purl,
|
|
200
|
+
"srcFile": $prop($, 'SrcFile')
|
|
201
|
+
}
|
|
202
|
+
message: "Chrome extension '{{ name }}@{{ version }}' has fingerprinting indicators with broad host access"
|
|
203
|
+
mitigation: "Review extension behavior for passive/active fingerprinting collection and reduce scope to required domains."
|
|
204
|
+
evidence: |
|
|
205
|
+
{
|
|
206
|
+
"capabilities": $prop($, 'cdx:chrome-extension:capabilities'),
|
|
207
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
208
|
+
"hostPermissions": $prop($, 'cdx:chrome-extension:hostPermissions')
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
- id: CHE-008
|
|
212
|
+
name: "AI-assistant extension with code injection on AI provider domains"
|
|
213
|
+
description: "Extensions targeting AI assistant domains (OpenAI/ChatGPT/Claude/Copilot) with code-injection capability should be reviewed for prompt/session manipulation risk."
|
|
214
|
+
severity: high
|
|
215
|
+
category: chrome-extension
|
|
216
|
+
condition: |
|
|
217
|
+
components[
|
|
218
|
+
$startsWith(purl, 'pkg:chrome-extension/')
|
|
219
|
+
and $propBool($, 'cdx:chrome-extension:capability:codeInjection') = true
|
|
220
|
+
and (
|
|
221
|
+
$contains($safeStr($prop($, 'cdx:chrome-extension:hostPermissions')), 'openai.com')
|
|
222
|
+
or $contains($safeStr($prop($, 'cdx:chrome-extension:hostPermissions')), 'chatgpt.com')
|
|
223
|
+
or $contains($safeStr($prop($, 'cdx:chrome-extension:hostPermissions')), 'claude.ai')
|
|
224
|
+
or $contains($safeStr($prop($, 'cdx:chrome-extension:hostPermissions')), 'github.com/copilot')
|
|
225
|
+
)
|
|
226
|
+
]
|
|
227
|
+
location: |
|
|
228
|
+
{
|
|
229
|
+
"bomRef": $. "bom-ref",
|
|
230
|
+
"purl": purl,
|
|
231
|
+
"srcFile": $prop($, 'SrcFile')
|
|
232
|
+
}
|
|
233
|
+
message: "AI-assistant extension '{{ name }}@{{ version }}' can inject code in assistant workflows"
|
|
234
|
+
mitigation: "Review prompt/session handling, enforce least-privilege host permissions, and gate deployment to trusted publishers."
|
|
235
|
+
evidence: |
|
|
236
|
+
{
|
|
237
|
+
"capabilities": $prop($, 'cdx:chrome-extension:capabilities'),
|
|
238
|
+
"permissions": $prop($, 'cdx:chrome-extension:permissions'),
|
|
239
|
+
"hostPermissions": $prop($, 'cdx:chrome-extension:hostPermissions')
|
|
240
|
+
}
|