|
| 1 | +# Agent Guidelines for provenant-action |
| 2 | + |
| 3 | +This repository is the **GitHub Action** wrapper for [Provenant](https://github.com/getprovenant/provenant), |
| 4 | +the Rust, ScanCode-compatible license/copyright/SBOM scanner. It is intentionally tiny: it does not |
| 5 | +contain the scanner, only a thin Docker container action that runs the published image. |
| 6 | + |
| 7 | +## What this repo is |
| 8 | + |
| 9 | +- A Docker container action (`runs.using: docker`). It builds a wrapper image that `FROM`s |
| 10 | + `ghcr.io/getprovenant/provenant` and adds a static busybox `sh` so `entrypoint.sh` can map the |
| 11 | + action inputs onto a `provenant scan` command line. |
| 12 | +- The scanner itself, its docs, and its release pipeline live in the main repo |
| 13 | + [`getprovenant/provenant`](https://github.com/getprovenant/provenant). Behavior questions about |
| 14 | + scanning, flags, or output belong there. |
| 15 | + |
| 16 | +## Key files |
| 17 | + |
| 18 | +- `action.yml` — action metadata, inputs, and the fixed positional arg order passed to the entrypoint. |
| 19 | +- `Dockerfile` — the wrapper image. Its `FROM ghcr.io/getprovenant/provenant:<tag>` line **pins the |
| 20 | + wrapped Provenant version** for a given action release. |
| 21 | +- `entrypoint.sh` — assembles and execs `provenant scan` from the four positional inputs. Keep it |
| 22 | + POSIX `sh` (busybox), and keep `paths`/`args` word-splitting intentional (see the inline comments). |
| 23 | +- `.github/workflows/ci.yml` — self-test that runs the action against `testdata/`. |
| 24 | + |
| 25 | +## Conventions (mirror the main repo) |
| 26 | + |
| 27 | +- Every source file carries SPDX headers (`SPDX-FileCopyrightText` + `SPDX-License-Identifier: Apache-2.0`). |
| 28 | +- Sign off commits with `git commit -s` (DCO). |
| 29 | +- Use Conventional Commits for commit messages and PR titles. |
| 30 | +- Pin third-party GitHub Actions by commit SHA (with a trailing `# vN` comment), matching the main repo. |
| 31 | + |
| 32 | +## Versioning and releases |
| 33 | + |
| 34 | +- The wrapped Provenant version is selected by the `FROM` tag in the `Dockerfile`, **not** by a |
| 35 | + call-time input (GitHub Actions forbids expressions in a container action's image reference). |
| 36 | +- Cutting an action release: bump the `Dockerfile` `FROM` tag to a concrete, working Provenant |
| 37 | + version, tag `vX.Y.Z`, and move the floating `vX` tag. Consumers pin `@vN` or a full SHA. |
| 38 | + |
| 39 | +## Current caveat |
| 40 | + |
| 41 | +The published `ghcr.io/getprovenant/provenant:latest` is a known-broken glibc build; a musl-static |
| 42 | +rebuild is merged upstream but not yet released. Until that release ships, the CI self-test's scan |
| 43 | +step is expected to fail and is guarded with `continue-on-error`. **Once a working image is |
| 44 | +published, pin the `Dockerfile` `FROM` to that version and remove `continue-on-error` from |
| 45 | +`.github/workflows/ci.yml`** so the self-test actually gates. |
0 commit comments