Skip to content

Commit b61043e

Browse files
authored
Merge pull request #89 from advanced-security/use-secret-scanning-tools-action
Update validation workflows to use Action
2 parents 3d61fd3 + 1b583d3 commit b61043e

File tree

13 files changed

+40
-31
lines changed

13 files changed

+40
-31
lines changed

.github/workflows/pr-markdown.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ name: Markdown Validation
22

33
on:
44
pull_request:
5-
branches: [ main, develop ]
5+
branches: [main, develop]
66

77
jobs:
88
run:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
13-
14-
- uses: actions/setup-python@v4
15-
with:
16-
python-version: '3.10'
12+
- uses: actions/checkout@v4
1713

1814
- name: Get Token
1915
id: get_workflow_token
@@ -22,17 +18,16 @@ jobs:
2218
application_id: ${{ secrets.ADVANCED_SECURITY_APP_ID }}
2319
application_private_key: ${{ secrets.ADVANCED_SECURITY_APP_KEY }}
2420

25-
- name: Install Deps
26-
run: python3 -m pip install pipenv && python3 -m pipenv install
21+
- name: Generate Markdown
22+
uses: advanced-security/secret-scanning-tools@v1
23+
with:
24+
mode: markdown
25+
token: ${{ steps.get_workflow_token.outputs.token }}
2726

28-
# Run Validation
29-
- name: Run Markdown Validation
27+
- name: Check git status
3028
env:
31-
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
29+
GH_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
3230
run: |
33-
pipenv run python ./.github/scripts/validate.py \
34-
--markdown
35-
3631
if [ -z "$(git status --porcelain)" ]; then
3732
gh pr comment --edit-last ${{ github.event.number }} \
3833
--body "## :white_check_mark: Markdown Validation Passed :rocket:!" || true

.github/workflows/validate.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Main
1+
name: Results Validation
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [main, develop]
66
pull_request:
7-
branches: [ main, develop ]
7+
branches: [main, develop]
88

99
workflow_dispatch:
1010

@@ -16,10 +16,7 @@ jobs:
1616
security-events: write
1717

1818
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-python@v2
21-
with:
22-
python-version: '3.9'
19+
- uses: actions/checkout@v4
2320

2421
- name: Get Token
2522
id: get_workflow_token
@@ -28,13 +25,8 @@ jobs:
2825
application_id: ${{ secrets.ADVANCED_SECURITY_APP_ID }}
2926
application_private_key: ${{ secrets.ADVANCED_SECURITY_APP_KEY }}
3027

31-
- name: Install Deps
32-
run: python3 -m pip install pipenv && python3 -m pipenv install
33-
34-
# Run Validation
35-
- name: Run Validation
36-
env:
37-
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
38-
run: |
39-
pipenv run python ./.github/scripts/validate.py \
40-
--validate
28+
- name: Validate results against snapshot
29+
uses: advanced-security/secret-scanning-tools@v1
30+
with:
31+
mode: validate
32+
token: ${{ steps.get_workflow_token.outputs.token }}

common/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# Commonly Used Secrets / Passwords
57

68
## Common Passwords Shortlist

configs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# Configuration Secrets
57

68
## Hardcoded Database Passwords

database/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# Database passwords
57

68
## Database Connection String (1)

generic/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# Generic Secrets / Passwords
57

68
## Generic Passwords

jwt/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# JWT
57

68
## JWT

password_store/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# Password stores
57

68
## Arc

pii/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# Personally identifiable information (PII)
57

68
## Credit Cards

pii/generate_iban/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!-- WARNING: This README is generated automatically
22
-->
33

4+
<!-- markdownlint-disable no-inline-html -->
5+
46
# IBANs
57

68
## IBAN for Albania

0 commit comments

Comments
 (0)