Skip to content

security: require zero CodeQL findings#64

Merged
Coding-Dev-Tools merged 5 commits into
mainfrom
codex/v1.0.1-codeql
Jul 23, 2026
Merged

security: require zero CodeQL findings#64
Coding-Dev-Tools merged 5 commits into
mainfrom
codex/v1.0.1-codeql

Conversation

@Coding-Dev-Tools

@Coding-Dev-Tools Coding-Dev-Tools commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • remediate all 59 CodeQL alerts initially present on main
  • redact provider and arbitrary exception details from API responses and logs
  • canonicalize and machine-verify caller-selected local path containment
  • replace adversarial regex and tag-filter paths with linear scanners and HTML parsing
  • fail CodeQL jobs whenever generated SARIF contains any finding
  • pin the verified Ruff release series and preserve the Python 3.9 package floor
  • preserve the deterministic SHA-1 feature-hash mapping; it is explicitly marked non-security use

Verification

  • hosted CodeQL Python: pass, zero SARIF findings
  • hosted CodeQL JavaScript/TypeScript: pass, zero SARIF findings
  • open CodeQL alerts on the PR merge ref: 0
  • Python 3.9 numpy-only floor: pass
  • Python 3.10, 3.11, and 3.12 full test/lint matrices: pass
  • browser accessibility, CSP, console, and axe checks: pass
  • package build and clean wheel install: pass
  • production Docker build, exact dependency audit, OCR runtime, health, and readiness: pass
  • local full test suite, Ruff, retrieval evaluations, ablation, build, and Twine checks: pass
  • independent parallel security reviews completed

The public release tag remains held fail-closed on the separate live backup, restore, alert-delivery, and paid-canary launch gates.

Comment thread engraphis/backends/graph_extractor.py Fixed
Comment thread engraphis/engines/ingest.py Fixed
Comment thread engraphis/routes/vault.py Fixed
Comment thread engraphis/service.py Fixed
Comment thread engraphis/service.py Fixed
Comment thread engraphis/routes/vault.py Fixed
Comment thread engraphis/service.py Fixed
Comment thread engraphis/routes/vault.py Fixed
Comment thread engraphis/routes/vault.py Fixed
Comment thread engraphis/service.py Fixed
Comment thread engraphis/service.py Fixed
@Coding-Dev-Tools
Coding-Dev-Tools marked this pull request as ready for review July 23, 2026 19:47
@Coding-Dev-Tools
Coding-Dev-Tools merged commit 10b0e6c into main Jul 23, 2026
11 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: e44d2ae681

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

with:
output: codeql-results
- name: Require clean CodeQL results
run: python scripts/check_codeql_sarif.py "${{ steps.analyze.outputs.sarif-output }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass the SARIF directory to the gate

analyze exposes sarif-output as the generated SARIF file path, but check_codeql_sarif.py treats its argument as a directory and calls rglob("*.sarif"). Since Path.rglob on that file returns no results, both matrix jobs fail with “no SARIF files found” even when CodeQL is clean, blocking every PR and main push. Pass the configured codeql-results directory instead, or make the checker accept an individual SARIF file.

Useful? React with 👍 / 👎.

Comment on lines +112 to +116
domain = text[domain_start:end]
dot = domain.rfind(".")
suffix = domain[dot + 1:] if dot > 0 else ""
if len(suffix) >= 2 and all(char in _EMAIL_SUFFIX_CHARS for char in suffix):
yield start, end, text[start:end]

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 Stop consuming sentence punctuation as email domain

When an email is followed by a period, such as bob@acme.com., the domain scan consumes the terminal period because . is allowed in _EMAIL_DOMAIN_CHARS; rfind then sees that final period and produces an empty suffix, so no email is emitted. This common prose case regresses the former regex behavior and can additionally produce the spurious @acme mention from the independent mention matcher. Trim trailing dots (and preserve the last non-empty label) before validating and yielding; the same copied logic in engines/ingest.py needs the equivalent fix.

Useful? React with 👍 / 👎.

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.

2 participants