Commit 1d96648
committed
Suppress CodeQL path-injection false positives on os.Stat checks
The four os.Stat(dir) pre-checks in applyGitInstallExisting,
applyGitInstallFresh, installExtractionSameDigestNewClients, and
installExtractionFresh are flagged by CodeQL's go/path-injection query
because 'dir' originates (transitively) from user-supplied client names.
The paths are safe: client names are validated against the known
skill-supporting client list, skill names pass validateLocalPath, and
PathResolver.GetSkillPath constructs paths from fixed base directories
which are then confirmed absolute and traversal-free by validateResolvedDir.
Add the same // lgtm[go/path-injection] suppression used in
pkg/skills/gitresolver/writer.go for the identical taint flow.
Signed-off-by: Samuele Verzi <samu@stacklok.com>
Made-with: Cursor1 parent b5ad7fd commit 1d96648
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | | - | |
| 809 | + | |
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| |||
1405 | 1405 | | |
1406 | 1406 | | |
1407 | 1407 | | |
1408 | | - | |
| 1408 | + | |
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | | - | |
| 1474 | + | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
| |||
0 commit comments