Commit cbe5848
Checkmarx Automation
Fix vendor library panic by adding default tags to file paths
- Add isFilePath() function to detect file paths vs image references
- Automatically append ':latest' tag to file paths without tags
- Prevents 'index out of range' panic in containers-syft-packages-extractor
- Handles file extensions: .tar, .tar.gz, .tgz and paths with / or - Preserves existing tags when present (e.g., 'file.tar:v1.0' unchanged)
WORKAROUND for vendor library bug where it expects image:tag format
but file paths don't naturally have tags. Resolves AST-108903 panic issue.1 parent f93a832 commit cbe5848
2 files changed
Lines changed: 29 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2050 | 2050 | | |
2051 | 2051 | | |
2052 | 2052 | | |
| 2053 | + | |
2053 | 2054 | | |
2054 | 2055 | | |
2055 | | - | |
| 2056 | + | |
2056 | 2057 | | |
2057 | 2058 | | |
2058 | | - | |
| 2059 | + | |
2059 | 2060 | | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2060 | 2069 | | |
2061 | 2070 | | |
2062 | 2071 | | |
2063 | 2072 | | |
2064 | 2073 | | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
2065 | 2084 | | |
2066 | 2085 | | |
2067 | 2086 | | |
| |||
3494 | 3513 | | |
3495 | 3514 | | |
3496 | 3515 | | |
3497 | | - | |
| 3516 | + | |
3498 | 3517 | | |
3499 | | - | |
3500 | | - | |
3501 | | - | |
3502 | | - | |
3503 | | - | |
| 3518 | + | |
3504 | 3519 | | |
3505 | 3520 | | |
3506 | 3521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2200 | 2200 | | |
2201 | 2201 | | |
2202 | 2202 | | |
2203 | | - | |
| 2203 | + | |
2204 | 2204 | | |
2205 | | - | |
| 2205 | + | |
| 2206 | + | |
2206 | 2207 | | |
2207 | 2208 | | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
2211 | 2212 | | |
2212 | 2213 | | |
2213 | 2214 | | |
| |||
0 commit comments