Skip to content

Commit a9c04ca

Browse files
authored
Add detect-secrets config (#108)
1 parent f05a2c0 commit a9c04ca

14 files changed

+168
-13
lines changed

.github/workflows/detect-secrets.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Detect Secrets
2+
3+
on: pull_request
4+
5+
jobs:
6+
detect-secrets:
7+
runs-on: ubuntu-22.04
8+
container: python:latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
14+
15+
- name: Install Yelp's detect secrets
16+
run: |
17+
apt-get update && apt-get install -y jq
18+
pip install yq
19+
pip install detect-secrets==$(yq -r .repos[0].rev .pre-commit-config.yaml)
20+
21+
- name: Detect potential secrets
22+
run: git ls-files -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
repos:
2+
- repo: https://github.com/Yelp/detect-secrets
3+
rev: v1.5.0
4+
hooks:
5+
- id: detect-secrets
6+
args: ['--baseline', '.secrets.baseline']

.secrets.baseline

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"version": "1.5.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "GitLabTokenDetector"
31+
},
32+
{
33+
"name": "HexHighEntropyString",
34+
"limit": 3.0
35+
},
36+
{
37+
"name": "IbmCloudIamDetector"
38+
},
39+
{
40+
"name": "IbmCosHmacDetector"
41+
},
42+
{
43+
"name": "IPPublicDetector"
44+
},
45+
{
46+
"name": "JwtTokenDetector"
47+
},
48+
{
49+
"name": "KeywordDetector",
50+
"keyword_exclude": ""
51+
},
52+
{
53+
"name": "MailchimpDetector"
54+
},
55+
{
56+
"name": "NpmDetector"
57+
},
58+
{
59+
"name": "OpenAIDetector"
60+
},
61+
{
62+
"name": "PrivateKeyDetector"
63+
},
64+
{
65+
"name": "PypiTokenDetector"
66+
},
67+
{
68+
"name": "SendGridDetector"
69+
},
70+
{
71+
"name": "SlackDetector"
72+
},
73+
{
74+
"name": "SoftlayerDetector"
75+
},
76+
{
77+
"name": "SquareOAuthDetector"
78+
},
79+
{
80+
"name": "StripeDetector"
81+
},
82+
{
83+
"name": "TelegramBotTokenDetector"
84+
},
85+
{
86+
"name": "TwilioKeyDetector"
87+
}
88+
],
89+
"filters_used": [
90+
{
91+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
92+
},
93+
{
94+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
95+
"min_level": 2
96+
},
97+
{
98+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
99+
},
100+
{
101+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
102+
},
103+
{
104+
"path": "detect_secrets.filters.heuristic.is_lock_file"
105+
},
106+
{
107+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
108+
},
109+
{
110+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
111+
},
112+
{
113+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
114+
},
115+
{
116+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
117+
},
118+
{
119+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
120+
},
121+
{
122+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
123+
}
124+
],
125+
"results": {},
126+
"generated_at": "2024-07-24T18:56:11Z"
127+
}

cassettes/test_connectivity.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interactions:
1818
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
1919
response:
2020
body:
21-
string: !!binary |
21+
string: !!binary | # pragma: allowlist secret
2222
H4sIAN5ri2QC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
2323
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
2424
yQYA/EJXWGkAAAA=
@@ -77,7 +77,7 @@ interactions:
7777
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
7878
response:
7979
body:
80-
string: !!binary |
80+
string: !!binary | # pragma: allowlist secret
8181
H4sIAN5ri2QC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
8282
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
8383
yQYA/EJXWGkAAAA=

cassettes/test_create_ticket.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interactions:
1818
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
1919
response:
2020
body:
21-
string: !!binary |
21+
string: !!binary | # pragma: allowlist secret
2222
H4sIAJr82GUC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
2323
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
2424
yQYA/EJXWGkAAAA=

cassettes/test_create_ticket_defaults.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interactions:
1818
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
1919
response:
2020
body:
21-
string: !!binary |
21+
string: !!binary | # pragma: allowlist secret
2222
H4sIAKQH2WUC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
2323
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
2424
yQYA/EJXWGkAAAA=

cassettes/test_failed_create.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interactions:
1818
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
1919
response:
2020
body:
21-
string: !!binary |
21+
string: !!binary | # pragma: allowlist secret
2222
H4sIAOxri2QC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
2323
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
2424
yQYA/EJXWGkAAAA=

cassettes/test_failed_update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interactions:
1818
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
1919
response:
2020
body:
21-
string: !!binary |
21+
string: !!binary | # pragma: allowlist secret
2222
H4sIAPBri2QC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
2323
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
2424
yQYA/EJXWGkAAAA=

cassettes/test_reassign_group.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interactions:
1818
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
1919
response:
2020
body:
21-
string: !!binary |
21+
string: !!binary | # pragma: allowlist secret
2222
H4sIALKWumUC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
2323
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
2424
yQYA/EJXWGkAAAA=

cassettes/test_reassign_user.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interactions:
1818
uri: https://help.uillinois.edu/SBTDWebApi/api/auth
1919
response:
2020
body:
21-
string: !!binary |
21+
string: !!binary | # pragma: allowlist secret
2222
H4sIALWWumUC/0ut9MpIck/O9M/08gyt8jT0y/Qs9swLMk129jTzzC6ICHP2stRLrfTKSfVwzPTP
2323
8jT0dUmv8A/xLPd1cbLUy48KSdI1T8mpKvRISQ5394kI8851LDXLNfQqDTGqjE8vNffUDYn0czML
2424
yQYA/EJXWGkAAAA=

0 commit comments

Comments
 (0)