fix(cli): reject credential-bearing Git dependencies - #8542
John Kennedy (jkennedyvz) wants to merge 8 commits into
Conversation
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Anuj Bolewar (anujbolewar)
left a comment
There was a problem hiding this comment.
Good hardening — rejecting credential-bearing Git URLs at config-parse time is the correct place to stop them before they reach a generated Dockerfile or image layer. Since the check is regex based, cover the obvious bypasses in tests: percent-encoded userinfo and alternative schemes such as git+ssh where a username may be embedded differently. Confirming the error message points users at the secret-backed credential-helper flow keeps the escape hatch discoverable.
|
Title: Gate is clean on my end: Specifics are inline on the diff. |
There was a problem hiding this comment.
Thanks, this covers everything I raised. Verified against 62ecd541: Node package and lock files are now scanned, the README describes what is actually covered, and errors name the file without echoing the value. libs/cli clean locally, 352 passed.
One nit, not blocking: the validate_config call site still passes no source, so a credential in langgraph.json itself gets the generic message. Passing config_path would close it.
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
|
Followed up on the final approval nit in 0cce2d2: direct dependency validation now reports the source |
Description
Reject Git HTTP dependency URLs containing userinfo before Docker generation so credentials cannot persist in Dockerfiles or image layers. Validation covers direct Python dependencies, local Python metadata, uv project and lock inputs, and common Node.js package and lock files at both workspace and application roots. Errors identify the inspected file path without echoing dependency contents.
Detection intentionally scans raw text conservatively, so placeholders such as
${GIT_TOKEN}@...and commented examples are rejected. Coverage remains best-effort because arbitrary files, nested requirements includes, and constraints can still be copied into a build context; the README now describes that boundary and warns against credentials in copied pip configuration.Test Plan
langgraph.jsonmake format;make lint; focused config suite: 132 passedMade by Open SWE