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
sarif_output=$(cat <<EOF
{
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "Custom Vulnerability Scanner",
"version": "1.0",
"informationUri": "https://example.com/tool-info",
"rules": [
{
"id": "API-DP9-2024",
"name": "Bot Data Modification",
"shortDescription": {
"text": "This rule identifies API endpoints vulnerable to bot data modification."
},
"fullDescription": {
"text": "Bot Data Modification vulnerabilities occur when an API endpoint allows unauthorized data modification by automated systems."
},
"helpUri": "https://example.com/rules/API-DP9-2024",
"defaultConfiguration": {
"level": "error"
}
}
]
}
},
"results": [
{
"ruleId": "API-DP9-2024",
"level": "error",
"message": {
"text": "Vulnerability Report: Bot Data Modification on POST /user Endpoint."
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "user",
"uriBaseId": "%SRCROOT%"
},
"region": {
"startLine": 1
}
}
}
]
}
]
}
]
}
EOF
)
Got Error failed
Error details: instance is not allowed to have the additional property ""
Error: Unable to upload "./vulnerabilities-results.sarif" as it is not valid SARIF:
- instance is not allowed to have the additional property ""
The text was updated successfully, but these errors were encountered:
To support the poster in creating valid SARIF from their JSON it would be helpful which validator was used that reported the error messages from the question.
When taking the valid JSON part from your question (without the shell Rococo) the validation without requesting additional ingestion rules at https://sarifweb.azurewebsites.net/Validation does succeed.
When requesting "Azure DevOps ingestion rules" in that validator form (anchored at lines 5, 7, 30 twice):
ADO1014: runs[0]: This 'run' object does not provide an 'automationDetails' property. This property is required by the Azure DevOps Advanced Security service.
ADO1018: runs[0].tool.driver: This 'driver' object does not provide a 'fullName' value. This property is required by the Azure DevOps Advanced Security service.
ADO1015: runs[0].results[0]: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the Azure DevOps Advanced Security service.
ADO1017: runs[0].results[0]: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the Azure DevOps Advanced Security service.
When requesting "GitHub ingestion rules" at line 14:
SARIF2012: runs[0].tool.driver.rules[0].name: 'Bot Data Modification' is not a Pascal-case identifier. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'.
Below is my Output which i want to convert into Sarif format
im trying in github action
Vulnerablilites:
Here is i try
Got Error failed
The text was updated successfully, but these errors were encountered: