Files
Kamino/SECURITY.md
T
Defame1297 87280a2f60
Build / build (pull_request) Successful in 28s
Molecule / molecule (pull_request) Successful in 9s
Lint / lint (pull_request) Successful in 1m56s
docs(security): date the no-failure evidence of the post-merge entry
Assisted-by: Claude Code
2026-11-26 21:27:39 +00:00

126 lines
6.7 KiB
Markdown

# Security policy
## Reporting a vulnerability
Report a suspected vulnerability privately by email to security@rkdr.net. Do not open a
public issue or pull request for it.
A report should say which role, script or workflow is affected, how to reproduce the
problem and what impact you expect. The maintainer will acknowledge the report and
coordinate a fix and its disclosure with you.
## Scope
This repository holds Ansible roles, CI workflows and the container images they use. Roles
change the hosts they run against, so a flaw that weakens a hardening default or leaks a
secret is in scope. Only the latest release is supported.
## Accepted risks
Risks this repository knowingly carries, as [ADR 0001](docs/adr/0001-threat-model.md)
requires: each with why it is accepted, the trigger that reopens it and its planned
reduction. A later decision that accepts a risk adds an entry here.
### Prompt injection of an unattended agent
- **Risk:** unattended agents act from the write agent account, so injected text can steer one
into pushing a branch whose workflow reads every secret this repository's workflows can
reach, before any review.
- **Why accepted:** small today, because registration is closed and the maintainer creates
every account. Cheap measure: an unattended agent acts only on `Status/Ready for Agent`
issues opened by the maintainer, a trusted contributor or an agent account, never adds that
label itself, and treats issue text as data ([rule](docs/agents/issue-tracker.md)).
- **Triggers**, the two moments to decide again: (1) an account the maintainer did not create
can write issues or comments, or a first injection is suspected; (2) the release bot's
secret is stored.
- **Planned reduction:** none for now.
### Every write-capable token reaches the secrets
- **Risk:** see the trust boundary in [ADR 0001](docs/adr/0001-threat-model.md).
- **Why accepted:** write access goes only to those trusted with the secrets, and every
secret is rotated when a writer is removed or a write-capable token leaks.
- **Trigger:** ephemeral runners, or secrets scoped to environments, are adopted.
- **Planned reduction:** none beyond the trigger.
### Shared runner
- **Risk:** one long-lived runner holds the image push credential, the release bot token and
the Renovate token. A Molecule job runs as root and can plant code in the cached molecule
virtualenv and collection cache that later jobs, the privileged ones included, reuse.
- **Why accepted:** only trusted contributors' runs execute on it. The runner is to be
registered for this repository only, never for the organisation. Another repository in the
organisation (the skills source) is to run on a runner sharing no host, Docker daemon, cache
or filesystem with it, and to share no secret with it; its content reaches this repository
only through the content re-check and code-owner review of `.claude/`.
- **Trigger and planned reduction:** ephemeral runners, a clean host per privileged job.
### Required checks can be satisfied by a posted commit status
- **Risk:** as far as is known, Gitea's required status checks match by context name and do
not check that Actions posted them, and the commit status API needs only code write. A
leaked bot or agent token could post `success` for Lint, Build and Molecule on its own
branch. Not tested on this server.
- **Why accepted:** a compromised bot or agent token gets cheap measures only (ADR 0001).
- **Trigger and planned reduction:** none; accepted as is.
### Agent-side hooks are a convenience, not a control
- **Risk:** agent-side hooks bind only Claude Code and can be switched off locally.
- **Why accepted:** server-side controls (branch protection, CI) hold the rules.
- **Trigger and planned reduction:** none; accepted as is.
### Release assets and tags
- **Risk:** any writer on Releases can replace a release asset, and the release bot can delete
and recreate `v*` tags, because Gitea checks tag create and delete with one permission. The
tag message's sha256 catches a swap by any writer except the release bot, so a leaked
release-bot token can replace a release unreviewed. This is why tag protection alone does
not protect releases once a release token exists.
- **Why accepted:** no artifact signing; consumers who need more pin the git route to a
commit.
- **Trigger and planned reduction:** none; accepted as is.
### Release tarball file modes
- **Risk:** the release tag's `MANIFEST.json` hash covers every file's content and the
Collection metadata, but not file modes. A writer who swaps the release tarball can change
a file's exec bit undetected.
- **Why accepted:** the Collection ships roles only.
- **Trigger and planned reduction:** none; accepted as is.
### A push onto a Renovate pull request that has a scheduled merge
- **Risk:** a writer can add a version-shaped change to such a pull request, and it merges as
the Renovate bot.
- **Why accepted:** bounded by the bot-diff check (`scripts/check_bot_pr_diff.py`: shape, not
value) and by code-owner approval, which a push dismisses; every account that can push there
already reaches every secret. There is no `renovate/*` push allowlist.
- **Trigger:** a token that can push here but cannot reach the secrets.
- **Planned reduction:** none for now.
### No Molecule run after a merge
- **Risk:** Molecule does not run on push to `main`
([ADR 0002](docs/adr/0002-self-built-ci-and-molecule-images.md)). Only the nightly full run
catches drift outside the tree (mirrors, images) or a scenario-selection mistake, and it is
the only run of the scenarios a pull request's diff did not select.
- **Why accepted:** "block on outdated branch" is on, so `main` only ever receives the tree its
pull request tested; no Molecule run on `main` failed after its pull request passed (3 to 17
November 2026).
- **Trigger:** a nightly run fails on a tree whose pull request passed.
- **Planned reduction:** none for now.
### Pin bumps first behaviour-tested after they merge
- **Risk:** Lint, Build and Molecule install a pull request's pins when they differ from the
image, so a pull request that changes an image input is tested on its own pins. But most pin
bumps select no Molecule scenario: every Python pin except an ansible-core minor bump, which
edits `meta/runtime.yml`. Such a bump is first behaviour-tested after it has merged, by the
pull request that moves the workflows to the new `ci` image.
- **Why accepted:** that pull request runs every scenario before the new image is used,
and running every scenario on every Python pin bump would cost about 10 minutes each.
- **Trigger:** the pull request that moves the workflows to a new `ci` image fails Molecule
because of a bumped pin.
- **Planned reduction:** none for now.