privado
privado copied to clipboard
Support for pattern list in rules
The current rule definition takes in a list of patterns; however, only the first one is tagged as a sink
, and the rest of the patterns are ignored. This creates significant confusion, as any user-specified enhancements & patterns may not be detected.
Ojaswa, this is a clarifying question. Can you please give an example of what you meant by content rule definition takes a list of patterns and the first one is tagged as a sink ? Is it that when the files are loaded, then the first file found in the directory tree for a specific sink name is picked up? And this might cause user defined sink patterns to be not added to the default patterns?
sinks:
- id: Leakages.Log.Error
name: Log Error
patterns:
- "(?i)(?:org.slf4j.Logger|org.tinylog.Logger|ch.qos.logback|java.util.logging|timber.log.Timber|android.util.Log).*(?:error|severe|fatal|[.]e[:]).*"
- "(?i)(?:org.apache.logging.log4j).*(?:error|severe|fatal|[.]e[:]).*"
tags:
@gnittala If we take this rule as example, patterns
is array of String, it supports multiple rule, but internally only the first element in this array will be used for detection, rest rules will be ignored.
This gets ignored currently
- "(?i)(?:org.apache.logging.log4j).*(?:error|severe|fatal|[.]e[:]).*"
Fixed by https://github.com/Privado-Inc/privado-core/pull/235