1- name : ' Z-AUTOMATED: SBOM Repo Scan '
1+ name : " Z-AUTOMATED: PR Checks "
22
33on :
44 pull_request :
55 types : [opened, synchronize, reopened]
66
7- permissions :
8- actions : read # Required for anchore/sbom-action
9- contents : write # Required for anchore/sbom-action
10- id-token : write # Required for requesting the JWT
11- pull-requests : write
12-
137jobs :
148 sbom_scan :
159 name : SBOM Repo Scan
1610 runs-on : ubuntu-latest
11+ permissions :
12+ actions : read # Required for anchore/sbom-action
13+ contents : write # Required for anchore/sbom-action
14+ id-token : write # Required for requesting the JWT
15+ pull-requests : write
1716 steps :
18- - uses : actions/checkout@v5
17+ - name : Checkout
18+ uses : actions/checkout@v5
1919 with :
20- fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
20+ fetch-depth : 0
2121
2222 - uses : anchore/sbom-action@v0
2323 with :
@@ -51,14 +51,14 @@ jobs:
5151 repo: context.repo.repo,
5252 issue_number: context.issue.number,
5353 })
54-
54+
5555 const botComment = comments.find(comment => {
5656 return comment.user.type === 'Bot' && comment.body.includes('Code security issues found')
5757 })
5858
5959 // 2. Prepare format of the comment
6060 const output = `### Code security issues found
61-
61+
6262 View full details [here](https://github.com/${{ github.repository }}/security/code-scanning?query=is%3Aopen+pr%3A${{ github.event.pull_request.number }}).`;
6363
6464 // 3. If we have a comment, update it, otherwise create a new one
7070 body: output
7171 })
7272 }
73-
73+
7474 github.rest.issues.createComment({
7575 issue_number: context.issue.number,
7676 owner: context.repo.owner,
8989 repo: context.repo.repo,
9090 issue_number: context.issue.number,
9191 })
92-
92+
9393 const botComment = comments.find(comment => {
9494 return comment.user.type === 'Bot' && comment.body.includes('Code security issues found')
9595 })
@@ -102,3 +102,21 @@ jobs:
102102 comment_id: botComment.id
103103 })
104104 }
105+
106+ markdown-validator :
107+ name : Markdown Validator
108+ runs-on : ubuntu-latest
109+ permissions :
110+ contents : read
111+ steps :
112+ - name : Checkout
113+ uses : actions/checkout@v6
114+ with :
115+ fetch-depth : 0
116+
117+ - name : Run Markdown Validator Script
118+ id : validate
119+ run : |
120+ BRANCH_NAME=${{ github.event.repository.default_branch }}
121+ chmod +x scripts/markdown-validator.sh
122+ scripts/markdown-validator.sh
0 commit comments