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.
Add executable VAL-P1–VAL-P15 coverage for security architecture validation #46457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add executable VAL-P1–VAL-P15 coverage for security architecture validation #46457
Changes from all commits
52bda0cfa9c111caeeaec3dda840d1bd9b1File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write-permission regex won't match quoted values:
formalVALWritePermissionLinematches lines likeissues: writebut will mississues: "write"(YAML quoted form). If the compiler ever emits quoted permission values,TestFormalVAL_P3,P10, andP15will silently pass while write permissions are present.💡 Suggested fix
Either extend the regex to handle optional quotes:
Or add an explicit test case that verifies the regex matches both
issues: writeandissues: "write"to document the intentional scope.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestFormalVAL_P6validates YAML position, not execution order:indexInNonCommentLineschecks where jobs appear in the YAML file, but GitHub Actions execution order is governed byneeds:dependencies, not line order. A compliant implementation could reorder jobs in the YAML while execution order remains correct — and vice versa, making this test a false signal in both directions.💡 Suggested fix
Assert on
needs:declarations rather than line positions:The existing
assert.Containscheck for"- detection"in the safe_outputs section (line 163) is correct; apply the same pattern to agent→detection ordering.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unchecked type assertion panics instead of failing the test:
result["run"].(string)will panic if sanitization removes or replaces therunkey with a non-string value. Test panics surface as cryptic failures rather than descriptive test failures.💡 Suggested fix
Use a guarded assertion:
This follows the same pattern already used at line 115 (
runVal, ok := sanitized["run"].(string)) inTestFormalVAL_P2.Uh oh!
There was an error while loading. Please reload this page.