@sonarsource/analyzer-commons-configurations 2.29.0-5138

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.
Files changed (2) hide show
  1. package/package.json +13 -0
  2. package/secret-patterns.json +101 -0
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@sonarsource/analyzer-commons-configurations",
3
+ "version": "2.29.0-5138",
4
+ "description": "Shared analyzer configuration data (secret-exclusion regexes) generated from the sonar-analyzer-commons SecretClassifier, for use by non-JVM SonarSource analyzers.",
5
+ "license": "LGPL-3.0-only",
6
+ "files": [
7
+ "secret-patterns.json"
8
+ ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/SonarSource/sonar-analyzer-commons.git"
12
+ }
13
+ }
@@ -0,0 +1,101 @@
1
+ {
2
+ "description": "Secret-exclusion patterns generated from SecretClassifier in sonar-analyzer-commons. Do not edit by hand. Regexes are applied case-insensitively with \"find\" (search-anywhere) semantics; exact values are matched in full, case-insensitively.",
3
+ "match": {
4
+ "regex": {
5
+ "semantics": "find",
6
+ "caseInsensitive": true
7
+ },
8
+ "exact": {
9
+ "caseInsensitive": true
10
+ }
11
+ },
12
+ "patternGroups": [
13
+ {
14
+ "category": "FAKE_VALUE",
15
+ "patterns": [
16
+ "^.{0,5}$",
17
+ "sample|example|placeholder|replace|change|foo|bar|test|fake|abcd",
18
+ "redacted|cafebabe|deadbeef|whatever|123456|admin|pass|secret|default|dummy|qwerty|setting|obfuscated",
19
+ "^(my)?pass(word|wd)?\\d{0,5}$",
20
+ "p[@a]ssw[o0]rd",
21
+ "^(?:none|undefined|null|true|false|yes|no|1|0)$",
22
+ "^your",
23
+ "(?<char>[\\w\\*\\.])\\k<char>{3}",
24
+ "^(?<repeated>.)\\k<repeated>*$",
25
+ "\\.\\.\\."
26
+ ]
27
+ },
28
+ {
29
+ "category": "PLACEHOLDER",
30
+ "patterns": [
31
+ "^(?:\\\\)?\\${1,2}\\{[^}]+\\}",
32
+ "(?:\\\\)?\\${1,2}\\{[^}]+\\}$",
33
+ "^\\#{1,2}[{(]",
34
+ "^\\(\\(.*\\)\\)$",
35
+ "^\\$\\(",
36
+ "^`[^`]+`$",
37
+ "^(?:\\\\)?\\${1,2}\\w+\\${0,2}$",
38
+ "^%?\\{[^}]+\\}$",
39
+ "^\\{{2,}[^}]+\\}{2,}",
40
+ "\\b(get)?env(iron)?\\b",
41
+ "process\\.env\\.",
42
+ "^%[^%]+%$",
43
+ "config[\\(\\[]",
44
+ "Read-Host",
45
+ "^<[\\w\\.\\t -]{1,10}>",
46
+ "^<[^>]+>$",
47
+ "^\\\\?\\([^)]+\\)$",
48
+ "^\\[[^\\]]+\\]$",
49
+ "^%\\([^)]+\\)s$",
50
+ "^@\\w+\\([^)]*\\)$",
51
+ "^__.+__$",
52
+ "^(?:todo|fixme)\\b"
53
+ ]
54
+ },
55
+ {
56
+ "category": "ENCRYPTED",
57
+ "patterns": [
58
+ "^encrypted:[a-zA-Z0-9+\\/]+={0,2}$",
59
+ "^\\{cipher\\}",
60
+ "^enc\\[",
61
+ "^%?enc\\{",
62
+ "^enc\\([^)]*\\)$"
63
+ ]
64
+ },
65
+ {
66
+ "category": "REFERENCE",
67
+ "patterns": [
68
+ "^arn:aws:secretsmanager:",
69
+ "^op:\\/[\\S\\ ]+$",
70
+ "^vault\\["
71
+ ]
72
+ },
73
+ {
74
+ "category": "STRUCTURED_FORMAT",
75
+ "patterns": [
76
+ "^(?:/[a-z0-9_.-]+){3,}$",
77
+ "^(?:>=?|<=?|[~^])?v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
78
+ "^v?\\d+(?:\\.\\d+)+(?:\\([^()]*\\))+$"
79
+ ]
80
+ }
81
+ ],
82
+ "exactMatchGroups": [
83
+ {
84
+ "category": "SECRET",
85
+ "values": [
86
+ "abc123",
87
+ "changeit",
88
+ "changeme",
89
+ "disabled",
90
+ "enabled",
91
+ "hunter2",
92
+ "letmein",
93
+ "optional",
94
+ "random",
95
+ "string",
96
+ "token",
97
+ "unknown"
98
+ ]
99
+ }
100
+ ]
101
+ }