Skip to content

Commit d668525

Browse files
Add GitHub Action and self-test (#14)
* Add GitHub Action and self-test Signed-off-by: François Proulx <[email protected]> Signed-off-by: Becojo <[email protected]>
1 parent b810cca commit d668525

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

.github/workflows/pop.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: POP - poutine on poutine
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- .github/workflows/**
8+
- action.yml
9+
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- .github/workflows/**
14+
- action.yml
15+
16+
permissions:
17+
security-events: write
18+
contents: read
19+
20+
jobs:
21+
pop:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
25+
with:
26+
disable-sudo: true
27+
egress-policy: audit
28+
allowed-endpoints: >
29+
github.com:443
30+
api.github.com:443
31+
codeload.github.com:443
32+
objects.githubusercontent.com:443
33+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
34+
- uses: ./
35+
name: "Run poutine on poutine's own codebase"
36+
id: self-test
37+
38+
- name: Upload SARIF file
39+
uses: github/codeql-action/upload-sarif@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
40+
with:
41+
sarif_file: results.sarif

Dockerfile.action

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ghcr.io/boostsecurityio/poutine:0.9.7@sha256:034326fac021cbedf8df99e90d993ec3553c7649395040bbb8bca05b601de35a
2+
3+
USER root
4+
5+
ENTRYPOINT ["/bin/sh", "-c"]

action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: poutine - GitHub Actions SAST
2+
description: |
3+
BoostSecurity.io’s poutine detects vulnerabilities and misconfigurations in your GitHub Actions workflows.
4+
Designed to streamline security analysis, poutine scans your repository’s CI/CD pipelines.
5+
It offers insights to secure your software supply chain efficiently.
6+
inputs:
7+
format:
8+
description: 'Report format'
9+
default: sarif
10+
required: true
11+
output:
12+
description: 'Report file output'
13+
default: results.sarif
14+
required: true
15+
runs:
16+
using: docker
17+
image: Dockerfile.action
18+
args:
19+
- |
20+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
21+
poutine -format "$INPUT_FORMAT" analyze_local "$GITHUB_WORKSPACE" > "$INPUT_OUTPUT"

0 commit comments

Comments
 (0)