Skip to content

Commit 0f8ba86

Browse files
Update secret-scanning.yml
Updated to match secret-scanning.yml
1 parent 0675388 commit 0f8ba86

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

secret-scanning.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: msdo-secret-scanning
1+
# Added seperately in case there is a need to run it seperately
2+
name: msdo-secret-scanning
23

34
on:
45
workflow_call:
@@ -24,6 +25,47 @@ jobs:
2425
git clone https://github.com/${{ github.repository }} .
2526
git checkout ${{ github.ref_name }}
2627
28+
- name: Inject .gdnsettings to support secrets detection in Terraform, Bicep, ARM, Python, and YAML
29+
run: |
30+
mkdir -p .gdn
31+
cat <<EOF > .gdn/.gdnsettings
32+
{
33+
"version": "1.0",
34+
"fileFiltering": {
35+
"filePathIncludes": [
36+
"**/*.tf",
37+
"**/*.tfvars",
38+
"**/*.bicep",
39+
"**/*.json",
40+
"**/*template*.json",
41+
"**/*.py",
42+
"**/*.yml",
43+
"**/*.yaml"
44+
],
45+
"fileNameExcludes": [],
46+
"filePathExcludes": []
47+
},
48+
"toolConfigurations": {
49+
"credscan": {
50+
"enabled": true,
51+
"parameters": {
52+
"scanUnknownExtensions": true,
53+
"scanAllFiles": true,
54+
"severity": "low"
55+
}
56+
}
57+
},
58+
"break": {
59+
"policies": [
60+
{
61+
"tool": "credscan",
62+
"minimumSeverity": "low"
63+
}
64+
]
65+
}
66+
}
67+
EOF
68+
2769
- name: Set tool to only run secret scan
2870
run: echo "TOOLS=credscan" >> $GITHUB_ENV
2971

@@ -69,7 +111,7 @@ jobs:
69111
"tool_name": "MSDO-CredScan"
70112
}
71113
EOF
72-
114+
73115
# - name: Alert to Microsoft Teams on secret detection
74116
# if: github.repository_visibility == 'public'
75117
# run: |

0 commit comments

Comments
 (0)