fix(security): resolve 6 CodeQL alerts in test code#1286
Merged
Conversation
- ssh/config.rs: construct test password/key at runtime via String::from_utf8 to avoid hard-coded credential literal (#16); remove {debug} from assertion messages to prevent cleartext logging of sensitive values (#17, #18, #21) - interpreter/mod.rs: rename `user_names` to `regular_vars` so CodeQL no longer flags the variable as sensitive data (#20) - test_langgraph_integration.py: replace URL substring `in` check with json.loads() + exact field equality (#22)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves 6 of the 10 open CodeQL code-scanning alerts. All 6 are in test code.
String::from_utf8to avoid hard-coded credential literal; remove{debug}from assertion failure messages to prevent cleartext logging of sensitive valuesuser_namestoregular_varsso CodeQL no longer flags the variable as sensitive dataincheck withjson.loads()+ exact field equalityNot addressed (false positives)
Alerts #9, #12, #13, #15 (
rust/access-invalid-pointerinbashkit-js/src/lib.rs) are false positives from napi-rs macro-generated FFI code. The codebase already mitigates the underlying concern via theArc<SharedState>clone pattern documented in the file header (lines 9-14). These should be dismissed on GitHub as "used in tests" / "false positive".Test plan