Skip to content

docs: Update extraction hardening methodology with PR submission requirements - #961

Merged
squid-protocol merged 3 commits into
mainfrom
update-extraction-workflow-instructions
Aug 2, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
update-extraction-workflow-instructions

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Updating the extraction hardening instructions to include the required PR and quality gate workflow, as discussed during the #842 Dockerfile issue.

…on rules against heredocs, multi-line continuations, and BuildKit syntax

This fix was developed using the rigorous 5-stage agent pipeline:

What the Agents Found:
- Heredoc and Continuation Blindness: Naive func_start regexes failed to handle \ line continuations and <<EOF heredocs, causing valid instructions to be missed and fake instructions inside heredocs to be incorrectly matched.
- False Positives in Lookalikes: Dependencies and commands disguised in comments or string literals were hallucinated due to lack of start-of-line anchors on the right side of OR expressions.
- Missing BuildKit Support: Dependencies pulled using COPY --from or FROM with cross-platform flags were often missed or partially captured without tags.

Engineering Implementation:
- Rewrote _dependency_capture and import regexes to properly anchor COPY --from and capture image tags.
- Added 15 adversarial tests in test_dockerfile.py covering modern BuildKit features, heredocs, edge-case spacing, syntax continuations, and embedded string literals.
- Known limitations: Simple line-by-line regexes without multi-line AST parsing still have edge cases inside deeply nested string literals, which require future architectural changes to completely solve.

QA Auditing: Verified the changes across the language-crucible corpus via crucible_check.py, successfully eliminating a hallucinated false positive 'criu' dependency capture in daemon.Dockerfile without introducing new false positives.
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 60e843d into main Aug 2, 2026
28 checks passed
@squid-protocol
squid-protocol deleted the update-extraction-workflow-instructions branch August 2, 2026 02:17
squid-protocol added a commit that referenced this pull request Aug 2, 2026
* Fix Extraction hardening: jcl #961: Harden JCL extraction rules

* Update full precision golden master

* Remove unused import in test_jcl.py

---------

Co-authored-by: Joe Esquibel <[email protected]>
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