Skip to content

Commit 3073599

Browse files
committed
2 parents d19d8f4 + b61043e commit 3073599

File tree

3 files changed

+23
-36
lines changed

3 files changed

+23
-36
lines changed

.github/secret_scanning.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
paths-ignore:
2-
- ".venv/*"
3-
- "*/__snapshots__/*"
4-
- "*/patterns.yml"
5-
- "README.md"
6-
- "*/README.md"
2+
- .venv/**
3+
- **/__snapshots__/**
4+
- **/patterns.yml
5+
- README.md
6+
- **/README.md

.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 }}

0 commit comments

Comments
 (0)