Skip to content

Commit 58a2abc

Browse files
committed
ci: add plumber workflow security check
Scans the workflows on each push to main and on pull requests, and fails when something regresses: an unpinned action, a job without a permissions block, an archived dependency, a known CVE. The config is a small overlay that inherits the CLI's built-in baseline and turns off one control this repo cannot satisfy yet, with a comment saying why. Each run publishes the score to score.getplumber.io, shown as a badge in the README.
1 parent 56c9e71 commit 58a2abc

3 files changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/plumber.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Plumber
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
plumber:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
permissions:
16+
contents: read
17+
security-events: write
18+
# Needed by score-push to publish the score for the README badge.
19+
id-token: write
20+
steps:
21+
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
22+
23+
- uses: getplumber/plumber@7ad9d267ee5a00163cec9e5c749a088d5f565167 # v0.4.26
24+
with:
25+
# Code scanning upload needs security-events write, which PRs
26+
# from forks do not get. The report stays available as a
27+
# workflow artifact there.
28+
upload-sarif: ${{ github.event.pull_request.head.repo.fork != true }}
29+
# Publishes the score to score.getplumber.io, which feeds the
30+
# badge in the README. A failed push never fails the run.
31+
score-push: true

.plumber.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Plumber overlay: inherits every control from the CLI's built-in
2+
# baseline, only the differences for this repo are written here.
3+
# Run 'plumber config resolve' to see the full effective config.
4+
extends: plumber:default
5+
version: "2.0"
6+
7+
github:
8+
controls:
9+
# Off for now: the release jobs restore the npm cache through
10+
# setup-node on release triggers. Scoping the cache key to the
11+
# release ref (or skipping the cache on publish) is a good
12+
# follow-up, but it is its own change.
13+
releaseWorkflowsMustNotRestoreUntrustedCache:
14+
enabled: false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# React Components for the Google Maps JavaScript API
22

33
[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/visgl/react-google-maps/tree/main/LICENSE)
4+
[![Plumber Score](https://score.getplumber.io/github.com/visgl/react-google-maps.svg)](https://score.getplumber.io/github.com/visgl/react-google-maps)
45

56
This is a TypeScript / JavaScript library to integrate the Maps JavaScript API
67
into your React application.

0 commit comments

Comments
 (0)