Skip to content

Security design

What the blueprint protects, what it trusts and which risks remain. SECURITY.md says how to report a vulnerability and how to verify a release, and argues why the repositories and their releases are safe; this page covers the blueprint itself: the template, blueprint.py with its code in blueprint/, the bots that run from this repository and the dashboard.

What you can expect

  • Copying or updating a repository from the blueprint runs no code of the blueprint on your machine. The template has no tasks, migrations or Jinja extensions, so Copier renders it in its sandboxed Jinja environment and needs no --trust.
  • blueprint.py never reads, prints or stores the value of a secret. It names the secrets that are missing and the gh secret set command that sets each one; you type the value into the prompt of the GitHub CLI.
  • blueprint.py settings apply changes only the settings of the repository it is run in, and only those that .github/repository.toml names.
  • A new release of the blueprint reaches a repository only as a pull request of the blueprint bot in that repository, which passes every check of the repository before it merges, or waits for the maintainer.
  • The dashboard shows only what is public anyway: no finding of code scanning and no alert of Dependabot.

What is protected

Asset Where it lives Protection
The template, which reaches every repository made from it template/, copier.yml and the shared files of this repository Pull requests with every required check, and the Variants workflow, which renders every kind of project and runs the checks of each one that the change alters with their real tools; a release with a change of a person, not only dependency updates and the bots' commits that make no release, waits for the maintainer
The settings of every repository .github/repository.toml of each repository Applied only by blueprint.py, by an administrator or by the settings bot on main; the bot compares them every week, so that a weaker setting shows
The private key of the release app, which can write the administration of the repositories it is installed on The secret RELEASE_AUTOMATION_PRIVATE_KEY of the environment release of each repository Only workflows on main can use the environment, whose rules bind the administrators too; each job asks for a token with the permissions it needs, which expires after an hour, and the token of the settings bot can't change the code or a workflow
The private key of the optional settings app, the only app that needs to write the administration once it is set up The secret SETTINGS_APP_PRIVATE_KEY of the environment release of each repository The same environment; the app has only the permissions of the settings, the settings bot asks it for the same token as the release app, for its repository alone, and the blueprint bot's token has only Administration, in a step that runs only blueprint.py of main and only adds the patterns of a verified release to the allowed actions (decision 0077)

Trust boundaries

The trust boundaries of the blueprint: Five boundaries. 1, this repository to every repository made from it, through a release that the blueprint bot of each repository verifies and the checks of that repository. 2, the template to Copier on your machine, as data for its sandboxed Jinja. 3, blueprint.py to GitHub, with the login of whoever starts it, reading every answer as untrusted. 4, Renovate to every repository, through pull requests without administration. 5, the dashboard to the public, with every value escaped.The trust boundaries of the blueprint: Five boundaries. 1, this repository to every repository made from it, through a release that the blueprint bot of each repository verifies and the checks of that repository. 2, the template to Copier on your machine, as data for its sandboxed Jinja. 3, blueprint.py to GitHub, with the login of whoever starts it, reading every answer as untrusted. 4, Renovate to every repository, through pull requests without administration. 5, the dashboard to the public, with every value escaped.

  1. This repository → every repository made from it. The blueprint bot of each repository runs copier update to the latest published release of the blueprint and opens a pull request there, every week and right after a release, when the Rollout workflow of this repository starts it, one repository after the other, with a token of the release app for that repository alone, which can only start workflows and read. Before the update, it verifies that the release workflow of the blueprint made the release: the release is immutable, its tag points at a commit of main, and the release workflow signed the tag. It refuses any other release, so a tag that someone else pushed reaches no repository. It commits the update with its own code from main, not with the code that the update brings, and never overwrites a commit of anyone else on its branch. The checks of that repository decide whether it merges; a conflict, which also turns its auto-merge off, or the repository variable BLUEPRINT_AUTOMERGE set to off, makes it wait for the maintainer.
  2. The template → Copier on your machine. The template is data for Copier's sandboxed Jinja; the answers of the questions are checked by their validators.
  3. blueprint.py → GitHub. It runs the GitHub CLI with the login of whoever starts it, or with the token of the settings bot, which may write the settings but neither the code nor the workflows, and treats every answer of GitHub as untrusted: an answer it can't read stops the run with an error, and so does a change that GitHub refused, also with a 404, which GitHub answers to a token without the permission for some changes.
  4. Renovate → every repository. It runs from this repository a few times a day, as the release app, once for each repository, with a token for that repository alone that can write contents, pull requests and workflows but not the administration. Its updates are pull requests that pass the checks of each repository; the weekly refresh of the lock files merges by itself only from versions a week old (decision 0137). For it, Renovate runs .github/blueprint.py locks --refresh of each repository, as it is on main, which runs uv and may build packages from their sources, in the same checkout where Renovate compiles the lock files itself, with a token for that repository alone (decision 0094). After every update of npm, it also runs .github/blueprint.py npm-overrides --fix there, which removes an override of npm that the update made needless: it runs npm only with --package-lock-only --ignore-scripts, so that no code of a package runs, and writes nothing but package.json and package-lock.json, both of which it puts back byte for byte whenever npm still needs the override; it reads the list of the branch's updates from the file that Renovate names in RENOVATE_POST_UPGRADE_COMMAND_DATA_FILE, puts back a package.json whose updates only move its lock file to what Git keeps in HEAD, and lets npm, with the same two flags, write anew a lock file whose root differs from its package.json, keeping that only when it brings no version that the lock file lacked (decision 1112). What fails reaches the issue Renovate logs problems.
  5. The dashboard → the public. It reads public data of GitHub and publishes a static page on GitHub Pages, with the same data as JSON and the releases of every repository as an Atom feed; every value it shows is escaped.

Threats and countermeasures

Threat Countermeasure Evidence
A harmful change of the template reaches every repository Pull requests with every required check here; every kind rendered and each one that the change alters checked with its real tools, also after an update from the latest release and with the answers of each repository that takes the blueprint; each of these repositories updated read-only before the merge, in the Downstream check, which is not required: its summary names every conflict, and it fails on each one that the pull request brings, in a page as in a workflow, a script or a configuration, and on the own checks of a repository that fail only with its update; a release with a change of a person, not only dependency updates and the bots' commits that make no release, waits for the maintainer; in each repository, the update passes its own checks the Variants and Downstream workflows, tests/test_template.py, tests/test_downstream.py
Copying or updating the blueprint runs code on the user's machine No tasks, migrations or Jinja extensions in copier.yml, so Copier needs no --trust test_copying_runs_no_code_of_the_blueprint in tests/test_template.py; the Variants workflow updates every kind without --trust
A rendered workflow loses its pins or runs with more permissions Every action pinned to the commit hash of a version, never of a branch, which zizmor would report as soon as the branch moves on; the workflows of a new repository are the blueprint's own, which zizmor and actionlint audit test_every_action_is_pinned_to_a_commit, test_no_workflow_pins_an_action_to_a_branch, test_the_workflows_are_the_blueprints_own
A pull request adds a vulnerability that CodeQL finds, or a weakness of a workflow that zizmor finds, and merges before anyone sees the alert The rule code scanning of Protect main: a new alert of CodeQL of high or critical severity, or a new error, stops the merge, and so does every new alert of zizmor, which analyzes every pull request with the version that its action pins; an alert that main has already doesn't, and the Findings workflow stays the backstop for the other tools test_a_new_alert_of_code_scanning_stops_the_merge in tests/test_blueprint.py, test_a_new_alert_of_codeql_or_zizmor_stops_the_merge and test_zizmor_audits_a_pull_request_as_it_audits_main in tests/test_template.py, decisions 0038 and 0073
An action that the workflows pin gets a security advisory, and the jobs go on running the vulnerable release zizmor asks GitHub for the advisories of every pinned action, in each pull request and in each analysis of main, after every merge and every week: the alert stops the merge of a pull request until main has it too, and from then on the Findings workflow fails until the pin moves. Dependabot raises no alert for an action pinned to a commit, so no update for the vulnerability comes on its own: Renovate moves the pin in its weekly window once the fixed release is a week old, or a maintainer moves it sooner, and the blueprint bot brings it to every repository test_zizmor_audits_a_pull_request_as_it_audits_main and test_no_workflow_pins_an_action_below_the_release_that_fixes_its_advisory in tests/test_template.py, decision 0073
A workflow change or an update brings, unnoticed, an action that no one chose, in a uses: line or inside another action Only the actions of GitHub and the patterns of [actions.selected] may run, as a setting of the repository; settings check follows every action that a workflow runs, also inside a composite action or a reusable workflow, and names each one that the list lacks, also a step that runs an image with docker://, which no pattern allows, and settings apply narrows the list only once every workflow can still start test_only_the_listed_actions_run in tests/test_template.py, test_an_action_that_an_action_runs_in_turn_needs_its_pattern and test_an_image_of_docker_stops_the_selected_actions in tests/test_blueprint.py
A private key, a connection string or a password that no provider issued is committed Secret scanning with its generic patterns, beside push protection for the secrets of its partners and the Gitleaks scan of every pull request test_generic_secret_patterns_are_switched_on in tests/test_blueprint.py
A version published minutes ago, perhaps from a hijacked account, reaches every repository with the weekly refresh of the lock files, which moves every indirect dependency to a newer version The refresh keeps to versions at least a week old, as every other update: Renovate gives npm --before= a week ago, and after Renovate, blueprint.py locks --refresh compiles the lock files of pip-compile again from uploads a week old, both for the refresh alone, so that the fix of a vulnerability still comes at once. The step Check the age of what the refresh of the lock files brings of the required check dependency-review asks PyPI and the registry of npm, whose dates no author can set, when each version that the refresh adds came out, and fails on a younger one, one that it can't date and a lock file of another package manager. The refresh of Composer, whose dates come from the package, merges by itself with versions of any age, a risk that the owner accepted, and the step names each of its versions as one that nothing dates (decision 0174); Renovate builds a refresh anew only in its window on Mondays, so what merges is what the checks saw (decision 0137) test_the_weekly_refresh_of_the_lock_files_merges_by_itself_from_versions_a_week_old in tests/test_template.py, tests/test_lock_age.py and the tests of the refresh in tests/test_locks.py
A lock file stops getting updates, also the fixes of vulnerabilities, because Renovate can't read the command in its header and skips it with no more than a warning in its log Every lock file of the blueprint and of each kind of project is read as Renovate reads it; in every pull request that changes the rules or a lock file, Renovate itself reads every file, and a warning or a lock file that it skips fails the check test_renovate_reads_every_lock_file_of_the_blueprint and test_renovate_reads_every_lock_file_of_a_project in tests/test_template.py; the job renovate rules of .github/workflows/renovate.yml
A package manager runs code of a dependency while it writes a lock file, and pushes with the token of Renovate to the other repositories of the owner Each run of Renovate has a token for its one repository, and the run lists what the token reaches and doesn't start Renovate when that is more; the one token that reaches the whole installation only reads the names of the repositories (decision 0094) test_each_run_of_renovate_has_a_token_for_its_repository_alone and test_renovate_doesnt_start_with_a_token_that_reaches_more in tests/test_template.py
A tool that the workflows download at a pinned version, such as gitsign, which signs the release tags, stays on an old release, or Renovate moves its version without its sha256 and the next release fails at the download Every pinned download has its line # renovate:; after Renovate moved a version, a week after its release, pins.py downloads the new release and writes its sha256 beside the version and into .github/pins.toml, and the name of its file where the pin names one, so that no workflow builds the name of a release asset itself, the tests fail while a version and its sha256 disagree with the record, and the bot runs no command but python3 pins.py, without a shell and without its environment; the checkout it runs in still holds the token of the release app in .git/config, so pins.py uses the standard library alone, runs nothing that it downloads, only hashes it, and a change of it is reviewed like one of a workflow; when the tests of a pull request fail, the fix bot runs python3 pins.py as well, in the check, with no more rights than the tests of the pull request have, and commits what it writes outside .github/workflows/ like every other fix tests/test_pins.py; test_the_downloads_of_the_workflows_follow_the_blueprint and test_renovate_finds_every_version_that_a_workflow_or_script_pins in tests/test_template.py
A server that a website downloads its fonts or Mermaid from, or someone between it and the runner, changes such a file, and the website serves it to every reader: the stylesheet of Google Fonts and the release of Mermaid had a version, but nothing checked a hash, and the cache of the Docs workflow kept what came for a week The fonts come from .github/mkdocs-blueprint-fonts.css, a copy of the stylesheet that names each font by an address with its version, and Mermaid from a release that Renovate moves; .github/mkdocs-blueprint-pins.toml holds the sha256 of each, which pins.py writes for a new release of Mermaid. The hooks check every download of the privacy plugin that it names, and every copy of one in the cache, and a file that differs fails the build and never reaches the cache or the website; a website downloads Mermaid only when a page still has a mermaid block. A file that a page of the project names from another server, such as a picture, isn't pinned, and fonts that a project names in theme.font come from Google Fonts test_the_privacy_plugin_gets_a_pinned_file_only_with_its_sha256, test_a_copy_in_the_cache_that_differs_from_its_pin_is_downloaded_again, test_a_mermaid_that_differs_or_fails_is_not_served_and_fails_a_strict_build, test_a_website_without_a_mermaid_block_downloads_no_mermaid and test_every_font_of_the_stylesheet_is_pinned_and_nothing_else in tests/test_mkdocs_hooks.py; tests/test_pins.py
blueprint.py leaks a secret It never reads the value of a secret; it only names the missing ones test_apply_sets_everything_but_the_secrets in tests/test_blueprint.py
An unexpected answer of GitHub makes blueprint.py apply wrong settings Every answer is read strictly; anything else stops the run with an error before a change test_errors_of_github_stop_the_run; coverage-guided fuzzing with Atheris in fuzz/fuzz_blueprint.py
The settings of a repository are weakened by hand The settings bot compares them with the settings as code after every change and every week, and applies them the Settings workflow of each repository
A release stands on a tag that the release workflow didn't sign: one that someone created first, at a commit of their own, or one that release-please created after the run of the merge was lost Every run of the Release workflow, not only the one of the merge, signs the tag of a merged release pull request before the release is created on it, and release-please creates a release only in a run that signed its tag; a tag that exists already must be the release workflow's own, signed at the commit of the merge, and the isolated build checks that again before it builds or signs anything .github/sign-tag.sh, tests/test_sign_tag.py
A rogue release tag: whoever can push a tag to the blueprint, with the token of a job that runs a third-party action or with a leaked token, creates the tag of a new version at a commit of their own, and every blueprint bot updates to it and merges its workflows Only the release app may create a release tag (the ruleset Release tag creation, which the settings bot applies where the variable RELEASE_AUTOMATION_APP_ID names the app), and like everyone else it can't move or delete one. The blueprint bot of each repository updates only to the latest published release that is immutable, whose tag points at a commit of the blueprint's main no older than the version the repository has, and that the release workflow of the blueprint signed with gitsign; it fails on any other release, before copier update runs test_only_the_release_app_creates_release_tags in tests/test_blueprint.py; test_the_blueprint_bot_verifies_the_release_before_it_updates in tests/test_template.py; .github/sign-tag.sh
A rogue release of the issue assistant: whoever can push a tag to the issue assistant publishes a release of their own, and the blueprint takes its workflows over and brings them to every repository The sync bot of the blueprint takes over only the latest published release of the issue assistant that is immutable, whose attestation by GitHub holds, whose tag points at a commit of its main and that its release workflow signed with gitsign; it fails on any other release before it installs anything. It installs exactly the verified commit, in a job without secrets, and the job of its pull request, which has the release app, runs nothing of the release and commits only workflows, the firewall policy and the files of the template that render workflows, by plain paths. Renovate doesn't move the pin of the issue assistant on its own test_the_sync_verifies_the_release_before_it_installs and test_any_other_release_of_the_issue_assistant_stops_the_sync in tests/test_sync_issue_assistant.py; .github/sign-tag.sh
An action of the build of a release, such as the one that writes the SBOMs or one that sets up PHP, Node or Python, takes the private key of the release app and writes to every repository it is installed on The build, build-release.yml, enters no environment and gets none of the secrets of the release workflow, only the token of its job; only a Nextcloud app's build enters an environment, signing, whose one secret is the key that signs the app, and gets only that secret passed. The delivery to the App Store and the registration of the app take the token of the App Store from appstore, which holds nothing else, and the registration signs the app id in a job of its own in signing (#530) test_a_release_is_built_without_the_secrets_of_the_release and test_a_nextcloud_app_declares_an_environment_for_signing_and_for_the_app_store in tests/test_template.py, .github/workflows/build-release.yml, .github/workflows/register-app.yml
A release that a run of another branch, a self-hosted runner or someone with a token made passes as one of the release workflow Release verification accepts only the provenance of build-release.yml, or for a container image of build-image.yml, its own isolated build, from a run for main on a runner of GitHub (--source-ref refs/heads/main --deny-self-hosted-runners), and runs as soon as anybody but the release workflow publishes a release, whose failure the bot-health bot reports in an issue; the SECURITY.md of every repository with a package gives its users the same command test_the_provenance_of_a_release_is_that_of_main_on_github in tests/test_template.py, .github/workflows/verify-release.yml
The private key of the release app is abused The environment release only for main, also for an administrator, who can't deploy past its rules; tokens per job with the least permissions, and none with every permission of the app; no administration for Renovate, and neither contents nor workflows for the settings bot .github/workflows/renovate.yml, .github/workflows/settings.yml, .github/repository.toml; test_no_token_of_the_release_app_has_every_permission_of_the_app and test_the_settings_bot_asks_for_a_token_with_only_what_it_needs in tests/test_template.py
A compromised action or tool in a job that holds a secret, an OIDC token or a token that may write sends them to a host of its own Harden-Runner blocks every host that such a job doesn't need: each job names the few hosts that its runs reach, those of a release by where PUBLISH_TO delivers it, and runs without sudo and Docker where it needs neither, stops when Harden-Runner has no agent that blocks, as when an outage of GitHub kept Harden-Runner from downloading it, instead of running without the block (decision 0134), and names the host when the agent took itself away again after one failed lookup of a host that it allows (decision 0171), and first waits until Harden-Runner lets those hosts through (decision 0088), on Harden-Runner v2.22.4, after a job that keeps sudo has taken GitHub's DNS experiment out of its way (decision 0123); the signing key of a Nextcloud app is only in the step that signs, which runs nothing of the project and removes the key also when it fails. CodeQL, zizmor, the taint report of a Nextcloud app and the publication of the website block too, with the hosts that their runs reached; the link check and the job that asks the published website, which reach hosts that nobody can name, hold no token that writes, and the issue of broken links and the publication are jobs of their own (decision 0130). Only Scorecard, whose API takes published results only from a job whose steps are all actions on its list, so that it can't wait for its hosts, the deliveries to PyPI and npm, which no repository uses yet, CodeQL in a repository with Go, Java or Kotlin, or Rust, whose dependencies it may fetch from hosts that no run has shown yet, the build of an image, whose Dockerfile reaches registries of its own, and Renovate record their traffic, each named with its reason in the SECURITY.md of the repository where it runs (decision 0080) test_every_privileged_job_blocks_the_hosts_that_it_doesnt_need, which also fails for a job that SECURITY.md names wrongly or not at all, test_security_md_names_the_renovate_that_only_records_where_it_runs, test_codeql_only_records_where_it_may_fetch_the_dependencies_of_the_code, test_every_job_that_blocks_stops_when_harden_runner_doesnt, test_the_job_stops_at_once_when_one_lookup_took_the_agent_away, test_every_job_that_blocks_waits_until_harden_runner_lets_its_hosts_through, test_every_job_that_blocks_and_keeps_sudo_lets_harden_runner_see_its_dns_lookups, test_no_workflow_pins_an_action_below_the_release_that_fixes_its_advisory and test_the_signing_key_of_a_nextcloud_app_is_only_in_the_step_that_signs in tests/test_template.py
A pull request makes the diagram bot commit more than its diagrams, as the release app The bot acts only for a branch of the repository and runs no code of the pull request: blueprint.py of main takes from the artifact of the check only sources in docs/diagrams/, SVG pictures in docs/images/diagrams/ and pages of Markdown, by plain paths, deletes only pictures, and commits only onto the commit that the check drew; its token can write contents and pull requests, not workflows. The bot of main, whose branch bot/diagrams moves from an older main to the newest across changes of workflows, can write workflows too, but runs nothing that it drew and commits only what the same blueprint.py lets through test_the_bot_writes_only_sources_pictures_and_pages, test_the_bot_refuses_anything_else and test_the_diagram_bot_commits_nothing_but_diagrams in tests/test_diagrams.py
A pull request makes the branch bot change a workflow, as the release app, whose token for the bot may change workflows so that it can bring a branch up to date across a change of a workflow on main The bot only asks GitHub to bring a branch up to date, which merges main into it as the button of the pull request does, and only for pull requests whose auto-merge someone turned on, from a fork only when its author allows edits by maintainers; it checks out only main, without the token, and runs nothing of the pull request test_the_branch_bot_moves_its_line_on_at_once and test_the_branch_bot_brings_a_branch_up_to_date_across_changes_of_workflows in tests/test_template.py
A contributor gets new code of a fork to run on the approval of the branch bot in place of a person's The bot approves only runs with exactly the head and the conclusion action_required, of a head that is a merge by its own account, which GitHub committed and verified, whose second parent is on main, on top of commits whose runs someone approved before, in a pull request that changes nothing that decides what a workflow runs. It reads all of it from the API in each run, anything unclear or a request that fails means no approval, each approval is in the summary of the run, and the release app has no right for it (decision) test_the_bot_doesnt_approve_what_a_person_has_to_approve, test_only_runs_of_exactly_this_head_that_wait_are_approved and test_any_failed_request_means_no_approval in tests/test_branches.py
A pull request of a fork gets its code to run in a workflow on pull_request_target, which holds a token that writes and the secrets; or GitHub's block of the event in public repositories from 2 December 2026 stops the required check conventional title and the bots of pull requests Only the six workflows that need a token that writes, or the release app, also for a fork or before a maintainer's approval, start on pull_request_target, each named with its reason in pull_request_target of [actions], and none of them checks out or runs anything of the pull request; the settings bot keeps an Actions event policy that lets exactly these start on it, with every other event that starts them, and no other workflow, and the check lint fails for a workflow on the event that the list lacks (decision 0138) test_the_event_policy_lets_exactly_the_workflows_on_pull_request_target_start and test_the_settings_read_the_events_of_every_workflow_as_yaml_does in tests/test_template.py; test_the_settings_keep_a_policy_for_the_workflows_on_pull_request_target and test_a_workflow_on_pull_request_target_that_the_list_lacks_is_named in tests/test_blueprint.py
The script of a project makes the screenshot bot or the Docs pictures bot commit more than pictures, as the release app The script runs in a job with a token that only reads and no secrets; the job with the release app runs nothing of it, checks out only blueprint.py, the settings of the bot and the Markdown of the pages of main and takes the artifact as data: only PNG, JPEG, GIF and WebP files whose content starts as their kind does, by plain paths outside .git and .github/workflows/, and text in UTF-8 at the exact paths that .github/screenshots.toml of its checkout of main names, outside .git and .github/, never a link, and only those that the report of the run names, committed onto the commit that was rendered; of a picture of another size, only whole numbers reach a page, into the width and the height it names on the checkout of main, whatever the report says; its permission for workflows only lets bot/screenshots and bot/pictures move onto a newer main blueprint/screenshots.py; tests/test_screenshots.py; test_the_screenshot_bot_runs_no_code_with_a_token_that_writes in tests/test_template.py
A pull request, also from a fork, makes the PR coach post mentions, links or HTML, overwrite another comment, or run its code with a token that can write The coach reads only the check runs and their annotations from the API, checks out only .github and blueprint of the default branch and runs no code of the pull request; it shows text that a pull request controls, such as the names of its checks, the messages and paths of their annotations, its title and its branch, only as escaped code on one line, cut to a length, and the entry that it adds to the changelog only in a block of code that none of its lines can close, without control characters; it links only to plain pages of github.com, to an artifact by its number and to the pages of the website of the repository whose names hold no character that could end a link, takes the versions and the address of the website from the default branch, and edits or deletes only its own marked comments, written by the token of the workflows test_the_report_shows_untrusted_text_only_as_code, test_no_untrusted_text_leaves_its_code and test_a_comment_of_someone_else_stays_as_it_is in tests/test_coach.py; test_the_entry_shows_only_as_code, test_every_entry_stays_in_its_block and test_the_website_of_a_pull_request in tests/test_pr_report.py; test_the_pr_coach_reads_the_checks_and_runs_no_code_of_the_pull_request in tests/test_template.py
A workflow of a pull request, also from a fork, makes the PR coach post headings, links, pictures, HTML or mentions under the name of the bot with the part that it keeps for the report, delete another comment with it, or stop the coach with an artifact too large to read The catalog of the default branch names each part, its title and the marker of the old comment that it replaces, never the coach's own; the coach runs nothing of the artifact, downloads only one of at most 256 kB into a folder of its own, reads 64 kB of report.md and never a link, and shows its text only as code: each paragraph, item and heading as inline code, each cell of a table as code with every pipe escaped, each block of code in a fence that none of its lines can close, without control characters, at most 8,000 characters of a part and four parts, which fill the comment only as far as it holds them; the only link of a part leads to its artifact, by the numbers of the API test_the_markdown_of_a_part_shows_as_data, test_no_text_of_a_part_leaves_its_code, test_a_report_that_is_a_link_is_none and test_the_parts_of_the_workflows_of_a_pull_request in tests/test_pr_report.py; test_an_incomplete_part_of_the_report_is_an_error and test_the_parts_that_one_comment_cannot_hold_are_counted in tests/test_coach.py, decision 0066
A pull request makes the fix bot commit more than the fixes of its checks, as the release app, or spam a pull request from a fork with suggestions The fix commands run only in the unprivileged jobs of the checks; the bot runs nothing of the pull request, checks out only .github and blueprint of the default branch, reads only the runs of the workflows that the list of after-checks.yml there names, and stops when it can't read that list, and takes the files that the checks kept as data: only text files that the commit has already, by plain paths, outside .git and .github/workflows/, a hundred at most, never a new, deleted or linked file, committed only onto the branch of the pull request while it is still at the commit of the checks, with a token that can write only contents. It commits at most twice in a row onto its own commits, leaves a pull request with the label no-bot-fixes alone, and pushes nothing to a fork by itself: there it posts at most ten suggestions in one review, none twice, each in a fence that its lines can't close test_the_bot_writes_only_plain_paths_outside_git_and_the_workflows, test_the_fixes_of_the_checks_are_text_files_by_plain_paths, test_the_bot_writes_no_link, test_the_bot_changes_only_files_that_the_commit_has, test_the_bot_never_fixes_its_own_fixes_again, test_the_bot_suggests_a_fix_once_and_only_so_many, test_a_workflow_off_the_list_of_main_keeps_nothing_for_the_bot, test_without_a_list_the_bot_takes_nothing and test_the_fix_bot_has_only_what_it_needs in tests/test_fixes.py, decision 0023
A comment makes the fix bot commit onto a pull request as the release app, or a contributor makes it put changes of their choice onto the branch of a fork under the name of the bot The job of commands.yml starts only for a comment on an open pull request whose first line is /fix alone, and does anything only when GitHub answers that its author has the permission admin or write on the repository at that time. It checks out only .github and blueprint of the default branch, runs nothing of the pull request and takes the fixes that the checks of the head kept as data, with every limit of the bot after the checks; on a fork, only those of files that the pull request changes and none that decides what a workflow runs, committed only while the branch is still at that head, with a token that can write only contents and read the pull request. The commit is no merge, so the branch bot never approves its runs, and a fork that refuses it gets the suggestions test_only_a_person_with_write_access_starts_the_bot, test_the_command_is_the_first_line_alone, test_the_command_commits_onto_the_branch_of_a_fork_only_what_it_changes, test_a_fork_that_refuses_the_commit_gets_the_suggestions and test_the_command_runs_nothing_of_the_pull_request in tests/test_fixes.py, decision 0117
A title makes the fix bot change the version of a release, put HTML, a mention or a link into the changelog, or add a file of its choice, as the release app The job own-branch runs only for a pull request from a branch of the repository, checks out only .github and blueprint of the default branch, and takes no artifact and no file of the pull request. It changes only the form of a title that names its own type: the type and the breaking mark stay as they stand, and a word for a type or a title without one stays a suggestion. The draft is one new file in changelog.d/, whose name it reduces to the letters of a fragment and takes only where the commit has none of that name, whose text is the words of the title below a heading of its kind, and which comes from no title with <, @ or ](. It drafts once for each pull request, and a fix that a check kept still can't add a file corrected_title in blueprint/coach.py, own_fix in blueprint/fixes.py, test_the_fix_bot_leaves_every_other_title_to_a_person in tests/test_coach.py, test_a_fix_of_the_checks_never_adds_a_fragment in tests/test_fixes.py
A pull request, also from a fork, makes the coverage in the report of the PR coach or the flaky-test bot post headings, links or mentions under the name of the bot, with the names of the files in its coverage report or of its jobs, steps and branch, or stops the PR coach with a report it can't read The bots run no code of the pull request and take its report and its logs as data: each name and each line of a log reaches the comment or the issue only as code on one line, cut to a length, with every pipe escaped, so that it ends neither its code nor its cell; the issue doesn't name the branch of a fork. Hits that are no count count as a number or as 0, a report that isn't UTF-8, or a Cobertura report that isn't XML, leaves the coverage out of the report, the table shows at most 100 files, so the comment always fits, and the coach writes it only for the head of the pull request. Fuzzing feeds any report to the bot test_a_crafted_file_name_stays_code_in_its_cell, test_no_file_name_ends_its_code_its_cell_or_its_line, test_no_hits_stop_the_bot and test_the_longest_comment_fits_into_one_comment_of_github in tests/test_coverage.py; test_the_flaky_test_bot_writes_names_and_logs_as_plain_code and test_the_flaky_test_bot_names_no_branch_of_a_fork, test_the_pr_coach_fetches_the_coverage_of_the_head_and_of_main in tests/test_template.py; test_the_coverage_of_the_report_from_the_command_line in tests/test_coach.py; coverage-guided fuzzing with Atheris in fuzz/fuzz_coverage.py
A pull request, also from a fork, makes the annotations of its checks start other commands of the runner, point at files outside the repository, or end the step early, with what its code makes a tool write What a tool writes is data: blueprint.py annotate names a file only when it is a file of the repository outside the folders of packages such as vendor/ and node_modules/, escapes every property and message as a workflow command needs it, leaves out the colors of a terminal and cuts a message at 2,000 characters. It passes every line on to the log as it is, and a line that it can't read is no finding: the exit code of the step stays that of the tool. The PR coach shows each annotation only as code test_no_text_of_a_tool_ends_its_command_early, test_only_a_file_of_the_repository_gets_the_annotation, test_a_parser_that_stumbles_passes_the_rest_on and the property test test_no_output_of_a_tool_breaks_a_parser in tests/test_annotate.py; test_the_ci_shows_each_finding_of_shellcheck_at_its_line in tests/test_template.py
A name, a description or the notes of a release run as script on the dashboard or in a feed reader Every value is escaped before it becomes HTML or XML, ElementTree writes the feed, and the feed holds the notes as plain text without the control characters that XML has no place for dashboard.py, test_the_feed_escapes_every_text in tests/test_dashboard.py

A pull request passes two gates beside its checks, as decision 0038 describes:

What a pull request passes before it merges: A pull request changes code or a workflow. Each workflow starts only when every action that it runs, and every action that these run in turn, is one of GitHub or matches a pattern of the list in the settings as code; a workflow that names another fails to start. The required checks then pass, and CodeQL and zizmor upload their analyses of the pull request. GitHub compares each with that of main: a new alert of CodeQL of high or critical severity, or a new error, stops the merge, and so does every new alert of zizmor; an alert that main has already doesn't. Otherwise the pull request merges.What a pull request passes before it merges: A pull request changes code or a workflow. Each workflow starts only when every action that it runs, and every action that these run in turn, is one of GitHub or matches a pattern of the list in the settings as code; a workflow that names another fails to start. The required checks then pass, and CodeQL and zizmor upload their analyses of the pull request. GitHub compares each with that of main: a new alert of CodeQL of high or critical severity, or a new error, stops the merge, and so does every new alert of zizmor; an alert that main has already doesn't. Otherwise the pull request merges.

Residual risks

  • The list of the allowed actions never restricts a local action (uses: ./…), also not one that a job clones while it runs: it catches a uses: line that slipped through and an action that another action runs in turn, not someone who changes a workflow on purpose. Review, actionlint and zizmor's audit stay the guard there.
  • The list of the allowed actions names no image of Docker, and GitHub refuses a step that runs one with docker://: a workflow runs an image with docker run in a run: step instead, pinned by its digest, which Renovate moves, and settings check names every docker:// step that a workflow or an action that it runs still has (decision 0064). A new action starts only once its pattern is on GitHub, so its pull request needs settings apply by a maintainer before its checks can run, as a renamed required check does; with the settings app, the blueprint bot adds the patterns of a verified release itself before it pushes the update. The check lint of every pull request follows every action that the workflows run, also in turn, and fails while the list in the files lacks one, so that no update of an action brings one that no one listed (decision 0074).
  • GitHub documents Actions event policies only briefly: it calls an event rule an allowlist, so the policy of the settings names every event of its workflows, and it asks for Administration (read and write) for every endpoint of the policies, even to read them, which the settings bot's token has; a token that can only read the administration gets the policy refused, and the settings bot names Administration then. GitHub offers no policies to a private repository on GitHub Free, which needs none, as GitHub blocks pull_request_target only in a public one (decision 0138).
  • The maintainer's account and the private key of the release app are the keys to every repository made from the blueprint; whoever holds them can change all of them.
  • One release app has every permission that the bots need, the administration too, and the environment release of every repository holds its private key: a job there that leaked the key could ask for a token with the administration of every repository of the app, though no job of the blueprint asks for one. The optional settings app takes the administration over once it is set up, and the release app can then give up Administration: a key of the release app can still change the code and the workflows, but no ruleset, environment or list of the allowed actions (decision 0075, decision 0077).
  • A job that blocks every host it doesn't need still reaches the API of GitHub and the storage of the run, so a compromised step there could still put a secret into an artifact or send it to a repository of its own with a token of its own; only the jobs of Renovate, of Scorecard, of the deliveries to PyPI and npm, of the build of an image and, in a repository with Go, Java or Kotlin, or Rust, of CodeQL record their traffic, each named with its reason in SECURITY.md (decision 0080, decision 0130). The pins of the actions and the review of their updates stay the guard.
  • The build of a Nextcloud app keeps sudo for setup-php and dpkg, so a step with root in that job, the project's scripts/check-package.sh too, could lift the block or leave a process behind that reads the signing key in the step that signs (decision 0080).
  • A change that is wrong but passes every check reaches every repository with the next release of the blueprint. The maintainer's review of every release with a change of a person is the last guard; a release of dependency updates and of the bots' commits that make no release, such as new pictures, merges itself, and what those bots commit passed every required check, as it does in every release. A pull request that a bot opened counts as the bot's even when someone with write access pushed to it later.
  • Copier and the GitHub CLI run with the permissions of whoever starts them.
  • A release of the issue assistant that its release workflow made reaches the blueprint with the pull request of the sync bot, which merges itself once every check passes, and every repository with the next release of the blueprint: the review of the release pull request of the issue assistant, and of every release of the blueprint that is not only dependency updates, is the guard.
  • The release app may create release tags, so its private key could create one at a commit of someone else's choice. Only the release workflow on main can sign a tag as the blueprint bot demands, the bot also refuses a new tag that points at the signed tag of an older release, as the signature names that older version, and the release workflow builds no release on a tag that it didn't sign, so such a tag reaches no repository; it only blocks the version it names until the maintainer looks. A step of the release workflow itself can sign a tag as the workflow, but the bot takes no commit before the version a repository has, so no tag takes a repository back to an older blueprint; such a step could only name a later commit of main as a release, one that every check of main has passed. A repository whose settings name no RELEASE_AUTOMATION_APP_ID keeps the rules of the release tags without the rule of their creation.
  • The checks of a Home Assistant integration run the current images of hassfest and HACS, not an image by digest, so that they validate against the rules of today, as the actions of both projects do. hassfest sees the checkout read-only, and HACS a token that can only read.
  • The check of the age of the refresh trusts the dates of PyPI and of the registry of npm, and counts a version from its first file: a new file of an old version, such as a wheel for a new Python, comes without the week of waiting. The refresh of pip-compile under the Mend Renovate app has no such check: the maintainer's review of its diff, which shows every new version, is the guard. The refresh of Composer has neither: a version of an indirect dependency of Composer can reach main without the week, also one published minutes before, from a hijacked account too, and only the other checks, such as the dependency review, OSV-Scanner and the tests, stand in its way (decision 0174).
  • pins.py pins the sha256 of a download as its release has it a week after it came out, so a release that someone replaced within that week is pinned as it is then; every later download is checked against that sha256. It runs in the container of Renovate, which holds the token of the release app, on the files of main with the version that Renovate moved: review a change of pins.py as one of a workflow.
  • An action that a project pins to a branch follows that branch without the week of waiting and merges on its own, so a bad commit there reaches the workflows of that project within hours. Pin an action to a release where it has one; the workflows of the blueprint pin none to a branch.
  • An image whose registry gives Renovate no date of its release, such as one of ghcr.io or an image of Docker Hub with more than 1,000 tags, comes without the week of waiting and merges on its own once every check passes, so an image published from a hijacked account reaches every repository at the next Monday run of Renovate; an image with a date still waits the week (decision 0148). Its digest keeps it the image that the checks tested.
  • The packages of Playwright from npm and PyPI, playwright, playwright-core and @playwright/**, come without the week of waiting as well, like its images on mcr.microsoft.com, which give no date: only the package of the same release starts the browsers of an image. A release of Playwright published from a hijacked account would reach every repository that uses it at the next Monday run of Renovate, as its image already would (decision 0168). npm installs the update of Playwright without --before, so that it doesn't refuse the package of the same release as the image; the packages of Playwright depend on each other by exact versions, so that brings no other package younger than the week.
  • The fix bot commits what the checks of a branch of the repository fixed with the tools of that branch, also on a branch of Renovate whose pull request merges itself, so a tool of the checks that turned malicious could put a change of a text file into such a commit. Such a tool runs in every check and release that uses it already; the bot adds no permission to it, keeps out of .git and the workflows, and each of its commits shows in the pull request with its files.