Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: MIT
#
# On a version tag push, archives the tagged tree and attests it via
# actions/attest-build-provenance, then creates a GitHub Release with the
# archive attached. This repo has no compiled artifact or container image,
# so the attestation covers "this tarball of the tagged tree came from this
# workflow run in this repo", not a full build-provenance chain the way it
# would for a compiled binary. A real but thinner guarantee, stated plainly
# rather than oversold.

name: release

on:
push:
tags:
- "v*"

permissions: {}

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
# No `with:` overrides needed: actions/checkout fetches the exact
# ref/SHA that triggered the workflow by default (a single commit,
# fetch-depth: 1). On a `push: tags:` trigger that ref is
# refs/tags/<tag>, and checkout's refspec logic fetches that tag ref
# locally by name in this case, so it is already resolvable for the
# `git archive` step below without fetch-depth: 0 or fetch-tags: true.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Archive tagged tree
run: git archive --format=tar.gz -o "$RUNNER_TEMP/release.tar.gz" "$GITHUB_REF_NAME"

- uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: ${{ runner.temp }}/release.tar.gz

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" "$RUNNER_TEMP/release.tar.gz" --generate-notes
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,30 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
carrying a `drift-detection` label when `has-changes == 'true'`, instead
of filing a new Issue every run. See the README's "Drift detection"
section.
- `.github/dependabot.yml`: weekly `github-actions` update checks,
covering every pinned SHA in `action.yml` and the workflow files.
- `SECURITY.md`: documents the SHA-pinning verification practice and
points to GitHub's private vulnerability reporting as the disclosure
channel.
- `.github/workflows/release.yml`: on a `v*` tag push, archives the
tagged tree and attests it with `actions/attest-build-provenance`,
then creates a GitHub Release from that archive. See the README's
"Supply chain" section for exactly what the attestation does and does
not prove.
- README "Supply chain" section: Dependabot cadence, the `SECURITY.md`
link, the release attestation's scope and limits, and a manual
follow-up note to enable tag protection on `v*` once `v1` is tagged.

### Notes

- `v1` hasn't been tagged yet. Before it is, a few things still need a
real, live run rather than a static check: a plan/apply against a real
R2 bucket and a real S3 bucket, a `policy-command` failure proven to
block a real `apply` (not just a step that reports failure), and a
real tag push exercised through `release.yml` end to end. Once `v1`
exists, tag protection on `v*` also needs to be enabled by hand in the
repo's Settings, see the README's "Supply chain" section.
- Private vulnerability reporting (Settings -> Security -> Private
vulnerability reporting) needs enabling by hand too. `SECURITY.md`
documents it as the disclosure channel, but the toggle isn't on by
default, so it needs confirming before that channel actually exists.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,30 @@ only issues carrying that label for its marker before deciding whether to
`PATCH` an existing Issue or `POST` a new one, so the search stays bounded
instead of scanning every open issue in the repo.

## Supply chain

`.github/dependabot.yml` watches every pinned `github-actions` SHA, in
`action.yml` and in the workflow files, on a weekly schedule, and opens a
PR when a pin goes stale.

See [`SECURITY.md`](SECURITY.md) for how to verify a pin yourself and
where to report a vulnerability, this README doesn't repeat that here.

On a `v*` tag push, `.github/workflows/release.yml` archives the tagged
tree and attests it with `actions/attest-build-provenance`. The
attestation proves one specific thing: a tarball of the tagged tree was
produced by that workflow, in this repo, for that tag. It's not a full
build-provenance chain for a compiled artifact, this project doesn't
produce one, there's no compiled binary or container image for a chain
like that to cover. A real guarantee, a narrower one than the phrase
"build provenance" might suggest by itself.

**Manual follow-up, not something any workflow configures:** once `v1`
is tagged, enable tag protection on `v*` in the repo's Settings
(Rulesets, or branch/tag protection). Without it, the tag could be
silently repointed at different code later, and nothing in this repo's
workflows would catch that.

## Inputs

| Input | Required | Default | Description |
Expand Down
40 changes: 40 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Security Policy

## Action pinning

Every third-party action this repo uses, in `action.yml` and in the
workflow and example files, is pinned to a full commit SHA with a
version-tag comment next to it, for example:

```yaml
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
```
The comment is a label for humans. The SHA is what actually runs. A
mutable tag like `@v7` can be moved to point at different code later,
a pinned SHA can't.

You don't have to take the tag-to-SHA mapping on faith. Check it
yourself:

```bash
git ls-remote --tags https://github.com/actions/checkout
```

Find the tag named in the comment (`v7.0.1` in the example above) and
confirm its commit matches the SHA pinned in the `uses:` line. If they
don't match, treat it as a problem and open an issue.

## Reporting a vulnerability

Report vulnerabilities through GitHub's private vulnerability
reporting for this repo: go to the repo's **Security** tab, then
**Report a vulnerability**. This sends the report privately to the
maintainers instead of a public issue, and keeps the conversation in
one place.

## Supported versions

This is a GitHub Action, not a versioned library with a support
matrix. Only the latest tagged release gets security fixes. Update
your pin to the newest tag when a fix ships.