pr-publication-safety
БесплатноБез исполняемых скриптовНе проверенUse when changing PR body rendering, home-path redaction, artifact path publication, pipeline-attestation markers, or pre-push attestation.
от kunchenguid★ 9 314 звёзд на GitHubОб этом скилле
Home-Path Redaction in Published PR Content (security)
internal/safepathis the one owner of home-directory redaction, the path analogue ofinternal/safeurl.RedactTextrewrites the process's own home plus/home/<user>,/Users/<user>, andC:\Users\<user>to~, unconditionally and for every occurrence. Add new shapes there rather than scrubbing paths at a call site. Candidate resolution must stay free offilepath.IsAbs/VolumeNameand of any reliance onfilepath.Clean's separator normalisation: those answer for the build platform, and on WindowsIsAbsdiscards the POSIX-rootedHOMEthat Git Bash, MSYS2, and Cygwin set - silently disabling redaction instead of failing. Regression:TestUsableHomeCandidate_AcceptsBothPlatformSpellings,TestHomeCandidates_AreSeparatorSpellingIndependent.redactPRContentinpr.goowns the publication redaction boundary:safepath.RedactWorktrees(the run worktreesctx.WorkDir, then any run worktree undernmWorktreesRoot()) beforesafepath.RedactText, the same order as evidence publication, since home redaction would stop the worktree roots matching.PRStep.buildPRContentuses it for ordinary drafts; template creation and live author-preserving updates use it throughcomposeOwnedPRContentbefore stamping their byte-integrity guard. Every source that can reach a PR body - agent prose, extracted intent, findings, fix summaries, step errors, artifactpath, artifact captions, and captured output embedded from evidence files - is covered there, so a new rendering path cannot reintroduce the leak. Ordinary drafts redact after length caps (the placeholder never grows a path); template composition redacts before its integrity guard and fail-closed size check.pr_ownership.goowns that marked-appendix contract: never feed live author text through heading-based stripping/clamping, and keeprebindOwnedPRAttestationin the pre-push restamp path so its integrity guard remains valid. Regressions:pr_template_test.go,pr_ownership_test.go.- The
artifacts[].pathdescription intestFindingsSchema(common.go) must not solicit absolute paths, and must not forbid them either. The renderer's allowlist is the worktree or the run's evidence directory and a path under neither is dropped, while the evidence directory defaults under the operator's home - so soliciting more just re-supplies what the boundary has to strip, and a blanket "never report a home directory path" clause makes an obedient agent drop its own evidence. Publication safety is thepr.goboundary's job; the schema only stops soliciting paths from elsewhere on the machine. Regressions:TestTestFindingsSchema_DoesNotSolicitAbsolutePaths,TestTestFindingsSchema_KeepsEvidenceDirectoryPathsReportable. - The opt-in evidence branch (
test.evidence.store_in_repo) is the second boundary:evidence.Publishruns its text files through the same worktree and home redaction (hashEvidenceFile, owned by thetest-evidence-storageskill). One other public surface deliberately does NOT share this rendering and is not covered: agent-authored commit subjects (commitAgentFixes->Commit.RenderFixMessage) and their trailers (withCommitTrailers->Commit.RenderTrailers, whose agent and model values are reduced to one safe token), which reach the remote through Push. Keep theinternal/safepathpackage doc honest about that scope. - The PR body must contain exactly ONE live pipeline-attestation marker, the run's own.
require-no-mistakes(.github/actions/require-no-mistakes/verify.py) binds the FIRST marker in the RAW body to the PR head, so a foreign copy placed earlier fails a PR the pipeline did produce - and a code fence is no defense, because that scan is raw text. Step agents embed foreign markers routinely, by capturing a generated PR body as evidence. - A CI repair that publishes a new head rewrites only that live marker's
head_shain the current PR body (restampPublishedAttestation) and does not send a title. It never inserts a marker that was not already there. Hosts without a PR content reader skip the restamp instead of failing the push. Regressions:TestCIStep_PublishRepairRebindsAttestationAcrossRepairPushes,TestCIStep_PublishRepairDoesNotMintAttestation,TestCIStep_PublishRepairSkipsRestampWithoutReader,TestRestampPRAttestation_PreservesContentEditedWhilePreparingRewrite,TestUpdatePROmitsTitleWhenEmpty. repository_overrides.<url>.pr.update_textiskeeporregenerate(default, also the absent key).keepis machine-local only. On create it uses the ordinary drafter and stores the narrative above an owned appendix (publishKeptDraft). On an existing PR it reuses the template preservation path: the title is omitted unlesspr.title_formatis set, the bytes before the appendix stay, and the appendix orminimalrisk line plus the attestation are rebuilt for the current head. An unowned attestation still fails closed.regeneratesta
Установить pr-publication-safety в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-publication-safety?
Use when changing PR body rendering, home-path redaction, artifact path publication, pipeline-attestation markers, or pre-push attestation.
Как установить скилл pr-publication-safety?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-publication-safety запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub