Skip to content

fix(slopguard): accept source environment template defaults - #127

Merged
altaywtf merged 1 commit into
mainfrom
fix/slopguard-template-defaults
Sep 5, 2026
Merged

fix(slopguard): accept source environment template defaults#127
altaywtf merged 1 commit into
mainfrom
fix/slopguard-template-defaults

Conversation

@altaywtf

@altaywtf altaywtf commented Sep 5, 2026

Copy link
Copy Markdown
Member

Problem

Ordinary comments, literal defaults and embedded placeholders in named environment templates prevent review before the provider runs, including when they occur only in deleted source. Fixes #126.

Solution

Remove the obsolete value classifier for changed .env.* templates ending in .example, .sample or .template. Keep the existing filename exception and all other collection guards, including rejection of real .env files and sensitive explicit context files. Document that operators authorize disclosure: a template filename does not establish that its contents are secret-free.

Proof

All five template collection cases failed before the fix and passed afterward. Built-binary tests confirm that a synthetic template branch reaches the fake provider exactly once, while the same content in .env fails before any provider call. Local release verification and snapshot packaging passed for all four targets. Independent whole-branch slopguard review with Codex Astra medium returned clean on 9b37f45 against 5ee30e4.

Retire placeholder value classification for named environment templates while preserving other target and context guards. Document disclosure responsibility and cover branch preimages and the CLI boundary.

Fixes #126
Copilot AI lite review requested due to automatic review settings September 5, 2026 14:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T14:41:20.706084Z 9b37f45 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@slopzapper slopzapper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ CLEAN

The change is clean. Named source templates now enter the bundle with defaults, and non-template sensitive paths plus explicit template context still fail closed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It relaxes a sensitive-path/content boundary that affects disclosure behavior, and should receive final human review despite the added tests and documentation.

Pull request overview

This PR updates Slopguard’s target collection to treat explicitly named environment template files as reviewable source material even when they contain ordinary comments, literal defaults, and placeholder-like strings—removing the prior “placeholder-only” value classification that blocked review (including for deleted/preimage content in branch diffs).

Changes:

  • Remove environment template value/diff validation so .env.*.{example,sample,template} content is bundled without placeholder-only enforcement.
  • Expand/adjust regression coverage to assert template defaults and deleted preimages are included, while explicit context inclusion of .env.* remains rejected.
  • Update TARGETS documentation and add a binary-level E2E test to confirm .env.example is reviewable but real .env is still blocked before provider invocation.
File summaries
File Description
cli/slopguard/internal/target/target_test.go Updates unit tests to cover defaults, comments, and deleted preimages for environment templates; keeps explicit-context rejection coverage.
cli/slopguard/internal/target/material.go Removes environment-template content safety checks for untracked/deleted materials; template handling now relies on filename-based exception only.
cli/slopguard/internal/target/freeze.go Drops environment-template diff validation during collection to allow non-placeholder template content in diffs.
cli/slopguard/internal/target/diff.go Removes validateEnvironmentTemplateDiff, eliminating placeholder-only enforcement at diff parsing time.
cli/slopguard/docs/TARGETS.md Documents the updated disclosure boundary and clarifies that template names do not imply secret-free content.
cli/slopguard/cmd/slopguard/template_e2e_test.go Adds binary E2E coverage for the .env.example vs .env boundary and provider-call behavior.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@altaywtf
altaywtf merged commit ddd9e72 into main Sep 5, 2026
12 checks passed
@altaywtf
altaywtf deleted the fix/slopguard-template-defaults branch September 5, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow ordinary source defaults in named environment templates

2 participants