Add Custom SAST & IaC Rules
Last updated
Was this helpful?
Was this helpful?
rules:
- id: CUSTOM-RULE-XXXX
message: It looks like MD5 is used
languages:
- javascript
paths:
include
- "*.js"
severity: WARNING
pattern-either:
- pattern: $CRYPTO.createHash("md5")
- pattern: CryptoJS.MD5(...)rules:
- id: CUSTOM-RULE-530
languages:
- hcl
severity: WARNING
message: >
A Lambda function was found with the "type:monitored" tag, but without a "service" tag.
patterns:
- pattern: |-
resource "aws_lambda_function" $ANYTHING {
...
tags = {..., type = "monitored", ...}
}
- pattern-not: |-
resource "aws_lambda_function" $ANYTHING {
...
tags = {..., service= "...", ...}
}