Skip to content

Commit 9c021ee

Browse files
authored
BST-17999 Add the github-actions scan tests (#269)
1 parent efcc8fe commit 9c021ee

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed

.github/workflows/scan-test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Scan Tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
paths: ['scanners/**']
7+
8+
jobs:
9+
github-action:
10+
name: Github Actions
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Generate GitHub App Token
14+
id: github-token
15+
uses: actions/create-github-app-token@v1
16+
with:
17+
app-id: ${{ secrets.BOOST_SCAN_RUNNER_GITHUB_APP_ID }}
18+
private-key: ${{ secrets.BOOST_SCAN_RUNNER_GITHUB_APP_PRIVATE_KEY }}
19+
owner: boostsecurityio
20+
repositories: scan-test-runner-gitbub-actions
21+
- name: Checkout scanner registry
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0 # Need full history to detect changes
25+
- name: Run Tests
26+
uses: boostsecurityio/scan-test-action@53e2f687ab93ac5d150b88abd7341b72f6fbf384
27+
with:
28+
provider: github-actions
29+
provider-config: |
30+
{
31+
"token": "${{ steps.github-token.outputs.token }}",
32+
"owner": "boostsecurityio",
33+
"repo": "scan-test-runner-gitbub-actions",
34+
"workflow_id": "test-scanner.yml"
35+
}
36+
registry-repo: "${{ github.repository_owner }}/${{ github.event.repository.name }}"
37+
base-ref: "${{ github.base_ref }}"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: "1.0"
22
tests:
3-
- name: "gitleaks"
4-
type: "source-code"
5-
source:
6-
url: "git@github.com:gitleaks/gitleaks.git"
7-
ref: "v8.15.2"
83
- name: "osv-scanner"
94
type: "source-code"
105
source:
116
url: "git@github.com:google/osv-scanner.git"
127
ref: "main"
8+
- name: "gitleaks"
9+
type: "source-code"
10+
source:
11+
url: "git@github.com:gitleaks/gitleaks.git"
12+
ref: "v8.15.2"

scanners/boostsecurityio/trivy-image/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ tests:
66
url: "https://github.com/martin-boost-dev/boost-poc-registry-testing-trivy"
77
ref: "main"
88
scan_paths:
9-
- "rclone"
109
- "osv-scanner"
10+
- "rclone"

0 commit comments

Comments
 (0)