dsh-code-security 0.3.7 → 0.4.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/CHANGELOG.md +17 -0
- package/README.en.md +7 -4
- package/README.md +7 -4
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/docs/ITERATION-2026-10-12.md +53 -0
- package/docs/USAGE.en.md +83 -20
- package/docs/USAGE.md +72 -52
- package/docs/VALIDATION.md +14 -0
- package/lib/audit.d.ts +27 -0
- package/lib/audit.js +109 -0
- package/lib/automatic.d.ts +18 -0
- package/lib/automatic.js +103 -0
- package/lib/client.js +63 -0
- package/lib/config.d.ts +9 -0
- package/lib/config.js +12 -1
- package/lib/deps.d.ts +14 -8
- package/lib/deps.js +170 -143
- package/lib/diff.d.ts +3 -0
- package/lib/diff.js +111 -33
- package/lib/engines.d.ts +50 -0
- package/lib/engines.js +255 -0
- package/lib/extra.d.ts +2 -1
- package/lib/extra.js +31 -6
- package/lib/index.d.ts +9 -2
- package/lib/index.js +46 -5
- package/lib/privacy.d.ts +6 -0
- package/lib/privacy.js +39 -0
- package/lib/rules.js +1 -1
- package/lib/runner.d.ts +4 -0
- package/lib/runner.js +8 -3
- package/lib/scanner.d.ts +14 -1
- package/lib/scanner.js +90 -36
- package/lib/state.d.ts +7 -0
- package/lib/state.js +30 -7
- package/lib/syntax.d.ts +1 -0
- package/lib/syntax.js +43 -0
- package/lib/tools.d.ts +4 -2
- package/lib/tools.js +67 -25
- package/lib/workbench.d.ts +30 -0
- package/lib/workbench.js +242 -0
- package/package.json +16 -3
- package/rules/betterleaks.toml +3 -0
- package/rules/osv.toml +1 -0
- package/rules/semgrep.yml +72 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Original rules for this plugin (MIT). No Semgrep-maintained registry rules bundled.
|
|
2
|
+
rules:
|
|
3
|
+
- id: dsh-js-command-input
|
|
4
|
+
languages: [javascript, typescript]
|
|
5
|
+
mode: taint
|
|
6
|
+
message: Request input flows into a shell command argument. Review quoting and use argument arrays.
|
|
7
|
+
severity: ERROR
|
|
8
|
+
metadata: {cwe: [CWE-78], confidence: MEDIUM}
|
|
9
|
+
pattern-sources:
|
|
10
|
+
- pattern-either:
|
|
11
|
+
- pattern: $REQ.query
|
|
12
|
+
- pattern: $REQ.body
|
|
13
|
+
- pattern: $REQ.params
|
|
14
|
+
pattern-sinks:
|
|
15
|
+
- patterns:
|
|
16
|
+
- pattern-either:
|
|
17
|
+
- pattern: exec($CMD, ...)
|
|
18
|
+
- pattern: execSync($CMD, ...)
|
|
19
|
+
- pattern: $CP.exec($CMD, ...)
|
|
20
|
+
- pattern: $CP.execSync($CMD, ...)
|
|
21
|
+
- focus-metavariable: $CMD
|
|
22
|
+
- id: dsh-js-html-input
|
|
23
|
+
languages: [javascript, typescript]
|
|
24
|
+
mode: taint
|
|
25
|
+
message: Request input flows into an HTML insertion point without a recognized sanitizer.
|
|
26
|
+
severity: ERROR
|
|
27
|
+
metadata: {cwe: [CWE-79], confidence: MEDIUM}
|
|
28
|
+
pattern-sources:
|
|
29
|
+
- pattern-either:
|
|
30
|
+
- pattern: $REQ.query
|
|
31
|
+
- pattern: $REQ.body
|
|
32
|
+
- pattern: $REQ.params
|
|
33
|
+
pattern-sinks:
|
|
34
|
+
- patterns:
|
|
35
|
+
- pattern: $EL.innerHTML = $HTML
|
|
36
|
+
- focus-metavariable: $HTML
|
|
37
|
+
- id: dsh-js-sql-input
|
|
38
|
+
languages: [javascript, typescript]
|
|
39
|
+
mode: taint
|
|
40
|
+
message: Request input flows into SQL text. Parameterized values are separate from SQL text.
|
|
41
|
+
severity: ERROR
|
|
42
|
+
metadata: {cwe: [CWE-89], confidence: MEDIUM}
|
|
43
|
+
pattern-sources:
|
|
44
|
+
- pattern-either:
|
|
45
|
+
- pattern: $REQ.query
|
|
46
|
+
- pattern: $REQ.body
|
|
47
|
+
- pattern: $REQ.params
|
|
48
|
+
pattern-sinks:
|
|
49
|
+
- patterns:
|
|
50
|
+
- pattern-either:
|
|
51
|
+
- pattern: $DB.query($SQL, ...)
|
|
52
|
+
- pattern: $DB.execute($SQL, ...)
|
|
53
|
+
- focus-metavariable: $SQL
|
|
54
|
+
- id: dsh-python-command-input
|
|
55
|
+
languages: [python]
|
|
56
|
+
mode: taint
|
|
57
|
+
message: Request input flows into a shell command argument.
|
|
58
|
+
severity: ERROR
|
|
59
|
+
metadata: {cwe: [CWE-78], confidence: MEDIUM}
|
|
60
|
+
pattern-sources:
|
|
61
|
+
- pattern-either:
|
|
62
|
+
- pattern: request.args
|
|
63
|
+
- pattern: request.form
|
|
64
|
+
- pattern: request.GET
|
|
65
|
+
- pattern: request.POST
|
|
66
|
+
pattern-sinks:
|
|
67
|
+
- patterns:
|
|
68
|
+
- pattern-either:
|
|
69
|
+
- pattern: os.system($CMD)
|
|
70
|
+
- pattern: subprocess.run($CMD, ..., shell=True, ...)
|
|
71
|
+
- pattern: subprocess.call($CMD, ..., shell=True, ...)
|
|
72
|
+
- focus-metavariable: $CMD
|