# Pr Publication Safety > Nota interna de seguridad del proyecto no-mistakes. Se usa al cambiar el render del cuerpo del PR, la redacción de rutas de home, la publicación de rutas de artefacto o los marcadores de attestation de pipeline. Fuente: https://skillsagentes.com/skills/kunchenguid/no-mistakes/pr-publication-safety Markdown: https://skillsagentes.com/skills/kunchenguid/no-mistakes/pr-publication-safety.md Repositorio: https://github.com/kunchenguid/no-mistakes Autor: kunchenguid Licencia: MIT Actualizado: anteayer Coste de contexto: 29 tok instalada, 1.1k tok al activarse, 1.1k tok con todos los archivos del bundle Bundle: 1 archivo, 4 KB Permisos que pide: ninguno declarado ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add kunchenguid/no-mistakes --skill pr-publication-safety --agent claude-code # Cursor npx -y skills add kunchenguid/no-mistakes --skill pr-publication-safety --agent cursor # Codex npx -y skills add kunchenguid/no-mistakes --skill pr-publication-safety --agent codex # Gemini CLI npx -y skills add kunchenguid/no-mistakes --skill pr-publication-safety --agent gemini # Windsurf npx -y skills add kunchenguid/no-mistakes --skill pr-publication-safety --agent windsurf # Cline npx -y skills add kunchenguid/no-mistakes --skill pr-publication-safety --agent cline ``` ## Qué hace - Nota interna de seguridad sobre la redacción de rutas de home en el contenido publicado del PR: `internal/safepath` es el dueño único, el análogo de rutas de `internal/safeurl`. - `RedactText` reescribe el home del proceso más `/home/`, `/Users/` y `C:\Users\` a `~`, incondicionalmente y en cada ocurrencia; las formas nuevas se añaden ahí, no en un call site. - `PRStep.buildPRContent` es el único límite de render: dibuja con `draftPRContent` y devuelve `redactPRContent(content)`, cubriendo prosa de agente, intención, findings, resúmenes de fix, errores de paso y rutas de artefacto. - El cuerpo del PR debe contener exactamente UN marcador de attestation de pipeline vivo, el del propio run; los agentes de paso incrustan marcadores ajenos de forma rutinaria al capturar cuerpos de PR generados. - La neutralización se hace en el punto de ensamblaje (`appendGeneratedSectionsToCleanBodyWithinLimit` más las dos rutas de intención), nunca por ruta de render. ## Cuándo usarla - Se cambia el render del cuerpo del PR, la redacción de rutas de home, la publicación de rutas de artefacto o los marcadores de attestation de pipeline. ## Qué la activa - "Voy a tocar el render del cuerpo del PR en no-mistakes" - "Añade una forma nueva de ruta de home a la redacción" - "Revisa que solo haya un marcador de attestation vivo en el PR" ## Archivos - SKILL.md — 4 KB ## SKILL.md Reproducido tal cual desde kunchenguid/no-mistakes bajo MIT. Esta sección es el documento original y está en inglés. **Home-Path Redaction in Published PR Content (security)** - `internal/safepath` is the one owner of home-directory redaction, the path analogue of `internal/safeurl`. `RedactText` rewrites the process's own home plus `/home/`, `/Users/`, and `C:\Users\` to `~`, unconditionally and for every occurrence. Add new shapes there rather than scrubbing paths at a call site. Candidate resolution must stay free of `filepath.IsAbs`/`VolumeName` and of any reliance on `filepath.Clean`'s separator normalisation: those answer for the build platform, and on Windows `IsAbs` discards the POSIX-rooted `HOME` that Git Bash, MSYS2, and Cygwin set - silently disabling redaction instead of failing. Regression: `TestUsableHomeCandidate_AcceptsBothPlatformSpellings`, `TestHomeCandidates_AreSeparatorSpellingIndependent`. - `PRStep.buildPRContent` is the single render boundary: it drafts through `draftPRContent` and returns `redactPRContent(content)`, and `Execute` publishes exactly that. Every source that can reach a PR body - agent prose, extracted intent, findings, fix summaries, step errors, artifact `path`, artifact captions, and captured output embedded from evidence files - is covered there, so a new rendering path cannot reintroduce the leak. Redaction runs after every length cap, which is only safe because the placeholder is never longer than the path it replaces. - The `artifacts[].path` description in `testFindingsSchema` (`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 the `pr.go` boundary's job; the schema only stops soliciting paths from elsewhere on the machine. Regressions: `TestTestFindingsSchema_DoesNotSolicitAbsolutePaths`, `TestTestFindingsSchema_KeepsEvidenceDirectoryPathsReportable`. - Two other public surfaces deliberately do NOT share this rendering and are not covered: agent-authored commit subjects (`commitAgentFixes` -> `Commit.RenderFixMessage`), which reach the remote through Push, and the opt-in evidence branch (`test.evidence.store_in_repo`), which copies artifact files verbatim. Keep the `internal/safepath` package 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_sha` in 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`. - Neutralize at the assembly choke point (`appendGeneratedSectionsToCleanBodyWithinLimit` plus the two intent paths), never per render path. `pipelineMD` alone carries the real marker and is left intact; `BuildPipelineSummaryFor` neutralizes its own step-detail blocks, which quote agent text. A first attempt put this in `escapePipelineFoldMarkers` - per-render-path - and shipped three live foreign markers to #831 anyway. Regressions: `TestPRStep_ForeignAttestationsInEveryComponentDoNotShadowTheRealOne` (all components at once), plus the per-component guards in `pr_test.go`. - Regressions: `internal/safepath/redact_test.go`, `internal/pipeline/steps/pr_homepath_test.go`. ## Dónde encaja - Categoría: [Seguridad](https://skillsagentes.com/categorias/seguridad.md) — Auditorías, revisión de dependencias, manejo de secretos y modelado de amenazas. - Creador: [kunchenguid](https://skillsagentes.com/creators/kunchenguid.md) — 16 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [No Mistakes](https://skillsagentes.com/skills/kunchenguid/no-mistakes/no-mistakes.md): Valida tus cambios de código por el pipeline de no-mistakes (review de código automatizado, tests, lint, docs, push, PR y CI) antes de que lleguen al destino de push configurado. Se activa con `/no-mistakes`. - [Pipeline Review And Agents](https://skillsagentes.com/skills/kunchenguid/no-mistakes/pipeline-review-and-agents.md): Nota interna del proyecto no-mistakes. Se usa al cambiar las sesiones de review, las decisiones sobre findings, los timeouts de agente, el comportamiento del Test local o la conformidad con la intención. - [Ci Monitor](https://skillsagentes.com/skills/kunchenguid/no-mistakes/ci-monitor.md): Nota interna del proyecto no-mistakes. Se usa al cambiar la readiness de CI, la recogida de checks del forge, los reruns, los timeouts de CI o la monitorización del ciclo de vida del PR. - [Testing Conventions](https://skillsagentes.com/skills/kunchenguid/no-mistakes/testing-conventions.md): Nota interna del proyecto no-mistakes. Se usa al añadir o cambiar tests, el harness e2e, el aislamiento de procesos de test o el sharding de tests en CI. - [Test Evidence Storage](https://skillsagentes.com/skills/kunchenguid/no-mistakes/test-evidence-storage.md): Nota interna del proyecto no-mistakes. Se usa al cambiar la recogida de evidencia de test, su publicación en una rama huérfana, sus rutas bajo el app root, la retención o la limpieza del scratch. ## Skills relacionadas - [Cso](https://skillsagentes.com/skills/garrytan/gstack/cso.md): Modo Chief Security Officer: auditoría de seguridad centrada en infraestructura, con OWASP Top 10, modelado de amenazas STRIDE y verificación activa. - [Security And Hardening](https://skillsagentes.com/skills/addyosmani/agent-skills/security-and-hardening.md): Endurece el código contra vulnerabilidades. Úsalo al manejar entrada de usuario, autenticación, almacenamiento de datos, integraciones externas o datos personales (GDPR, CCPA). - [Owasp Top 10 Testing](https://skillsagentes.com/skills/usestrix/strix/owasp-top-10-testing.md): Prueba una aplicación contra el OWASP Top 10:2025 con Strix: agentes de IA que intentan exploits reales y reportan solo lo probado, con PoC. - [Find Security Vulnerabilities In Code](https://skillsagentes.com/skills/usestrix/strix/find-security-vulnerabilities-in-code.md): Revisión de seguridad de caja blanca con IA: lee el código fuente, razona sobre el flujo de datos y la autorización, y explota lo que encuentra con PoC. - [Api Security Testing](https://skillsagentes.com/skills/usestrix/strix/api-security-testing.md): Pon a prueba una API REST, GraphQL o gRPC con Strix: agentes autónomos enumeran endpoints y explotan el OWASP API Security Top 10 (2023) con una PoC funcional por cada hallazgo. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)