Skip to content

Commit 5db5081

Browse files
Update secret-scanning.yml
added .gdn/.gdnsettings to force scanning of .tf files
1 parent da4431b commit 5db5081

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

.github/workflows/secret-scanning.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: msdo-secret-scanning
1+
name: msdo-secret-scanning
22

33
on:
44
workflow_call:
@@ -24,6 +24,38 @@ 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
28+
run: |
29+
mkdir -p .gdn
30+
cat <<EOF > .gdn/.gdnsettings
31+
{
32+
"version": "1.0",
33+
"fileFiltering": {
34+
"filePathIncludes": ["**/*.tf"],
35+
"fileNameExcludes": [],
36+
"filePathExcludes": []
37+
},
38+
"toolConfigurations": {
39+
"credscan": {
40+
"enabled": true,
41+
"parameters": {
42+
"extension": ".tf",
43+
"scanUnknownExtensions": true,
44+
"severity": "high"
45+
}
46+
}
47+
},
48+
"break": {
49+
"policies": [
50+
{
51+
"tool": "credscan",
52+
"minimumSeverity": "medium"
53+
}
54+
]
55+
}
56+
}
57+
EOF
58+
2759
- name: Set tool to only run secret scan
2860
run: echo "TOOLS=credscan" >> $GITHUB_ENV
2961

@@ -68,8 +100,8 @@ jobs:
68100
"checkout_uri": "https://github.com/${{ github.repository }}",
69101
"tool_name": "MSDO-CredScan"
70102
}
71-
EOF
72-
103+
EOF
104+
73105
# - name: Alert to Microsoft Teams on secret detection
74106
# if: github.repository_visibility == 'public'
75107
# run: |

0 commit comments

Comments
 (0)