You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
According to latest GitLab SAST report schema schema field "category" is not even defined in "vulnerabilities" items, but probably required (which is not obvious...)
Additional context
GitLab version >= 17.5
Checkov version <= 3.2.334
Temporary fix
variables:
CHECKOV_IMAGE: bridgecrew/checkov:latest
checkov:
stage: test
image: $CHECKOV_IMAGE
interruptible: true
variables:
CHECKOV_FRAMEWORK: all
CHECKOV_EXTRA_ARGS: ""
CHECKOV_DIRECTORY: .
script:
- |
cat << 'EOF' > transform-schema.py
import json
file_path = "checkov.json"
with open(file_path, 'r') as file:
data = json.load(file)
if "vulnerabilities" in data and len(data["vulnerabilities"]) > 0:
for vulnerability in data["vulnerabilities"]:
vulnerability["category"] = "sast"
with open(file_path, 'w') as file:
json.dump(data, file, indent=2)
EOF
checkov --soft-fail -d $CHECKOV_DIRECTORY --framework $CHECKOV_FRAMEWORK -o gitlab_sast $CHECKOV_EXTRA_ARGS | tee checkov.json
python3 transform-schema.py
artifacts:
reports:
sast: checkov.json
The text was updated successfully, but these errors were encountered:
Describe the issue
According to latest GitLab SAST report schema schema field "category" is not even defined in "vulnerabilities" items, but probably required (which is not obvious...)
Additional context
GitLab version >= 17.5
Checkov version <= 3.2.334
Temporary fix
The text was updated successfully, but these errors were encountered: