Skip to content

Commit cbec9d6

Browse files
Update secret-scanning.yml
Updated .gdn settings to specifically search specific extensions
1 parent 6c2736b commit cbec9d6

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/secret-scanning.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,45 @@ jobs:
2424
git clone https://github.com/${{ github.repository }} .
2525
git checkout ${{ github.ref_name }}
2626
27-
- name: Inject .gdnsettings to force .tf secret scanning
27+
- name: Inject .gdnsettings to support secrets detection in Terraform, Bicep, ARM, Python, and YAML
2828
run: |
2929
mkdir -p .gdn
30-
echo '{
30+
cat <<EOF > .gdn/.gdnsettings
31+
{
3132
"version": "1.0",
3233
"fileFiltering": {
33-
"filePathIncludes": ["**/*.tf"],
34+
"filePathIncludes": [
35+
"**/*.tf",
36+
"**/*.tfvars",
37+
"**/*.bicep",
38+
"**/*.json",
39+
"**/*template*.json",
40+
"**/*.py",
41+
"**/*.yml",
42+
"**/*.yaml"
43+
],
3444
"fileNameExcludes": [],
3545
"filePathExcludes": []
3646
},
3747
"toolConfigurations": {
3848
"credscan": {
3949
"enabled": true,
4050
"parameters": {
41-
"extension": ".tf",
4251
"scanUnknownExtensions": true,
43-
"severity": "high"
52+
"severity": "low"
4453
}
4554
}
4655
},
4756
"break": {
4857
"policies": [
4958
{
5059
"tool": "credscan",
51-
"minimumSeverity": "medium"
60+
"minimumSeverity": "low"
5261
}
5362
]
5463
}
55-
}' > .gdn/.gdnsettings
64+
}
65+
EOF
5666
5767
- name: Set tool to only run secret scan
5868
run: echo "TOOLS=credscan" >> $GITHUB_ENV

0 commit comments

Comments
 (0)