Skip to content

[codex] Harden WATCHLIST validation - #7

Merged
dd3ok merged 4 commits into
mainfrom
codex/watchlist-v0.2-hardening
May 15, 2026
Merged

[codex] Harden WATCHLIST validation#7
dd3ok merged 4 commits into
mainfrom
codex/watchlist-v0.2-hardening

Conversation

@dd3ok

@dd3ok dd3ok commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • bump release metadata to 0.2.0
  • add strict validator options for format checks, safety scanning, archive-section validation, and JSON output
  • add release metadata and policy drift checkers to CI
  • add concise quickstart, non-goals, contributing, security, and PR template guidance

Validation

  • python3 -m unittest discover -s evals -p 'test_*.py'
  • python3 evals/check_watchlist.py .watchlist/WATCHLIST.md --strict-safety --require-archive-section
  • python3 evals/check_watchlist.py .agents/skills/watchlist-md/assets/WATCHLIST.template.md --strict-safety --require-archive-section
  • python3 evals/check_release_metadata.py
  • python3 evals/check_policy_markers.py
  • python3 -m py_compile evals/check_watchlist.py evals/check_policy_markers.py evals/check_release_metadata.py evals/test_check_watchlist.py
  • git diff --check

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request upgrades the project to version 0.2.0, introducing a more robust validation system and expanded documentation. Key additions include strict safety scanning for secrets, format enforcement, and new CI scripts to verify policy markers and release metadata. Documentation was updated with a quickstart guide, security policies, and a PR template. A review comment correctly identified unreachable logic in the safety scanning function of the validator script, noting that the current implementation prevents the reporting of non-blocking warnings.

Comment thread evals/check_watchlist.py Outdated
Comment on lines +280 to +283
if severity == "error" or strict_safety:
add_error(result, code, message, watch_id, field, severity=severity)
else:
add_warning(result, code, message, watch_id, field)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The else block (lines 282-283) is currently unreachable. The function scan_safety returns early if strict_safety is False (line 271). When strict_safety is True, the condition severity == "error" or strict_safety (line 280) is always true.

If safety scanning is intended to be a strictly opt-in feature that always blocks on findings, you can simplify this logic to always call add_error. If you intended to allow non-blocking safety warnings (e.g., for patterns marked as warning in SENSITIVE_PATTERNS) when not in strict mode, you should remove the early return at line 271 and adjust the condition at line 280.

@dd3ok
dd3ok marked this pull request as ready for review May 15, 2026 11:59
@dd3ok
dd3ok merged commit 918454b into main May 15, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c00f2e189e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread evals/check_watchlist.py
fields["last_checked_at"],
allow_unscheduled=False,
)
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Run safety scan even when fields are missing

When a WATCHLIST item is missing any required field, this continue skips scan_safety, so --strict-safety can fail only with MISSING_REQUIRED_FIELDS while never reporting an embedded token, signed URL, or raw private excerpt in the fields that were present. In that malformed-entry scenario, the new redaction/rotation guidance is withheld even though the unsafe value is still in the file; scan the parsed fields before continuing or otherwise report safety findings independently of format errors.

Useful? React with 👍 / 👎.

@dd3ok
dd3ok deleted the codex/watchlist-v0.2-hardening branch May 18, 2026 23:32
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.

1 participant