Closed nkreiger closed 2 months ago
Seeming same issue with any non-code file (json
, yaml
, .config
).
Copied the default rules in case my syntax was incorrect, no luck.
It looks like the tag needed to have Metadata
in it for some reason. Not sure why that is.
Feel free to close if that's expected.
This is the currently the intended behavior, you need the -A/--allow-all-tags-in-build-files argument to the cli to match non 'metadata' tags in 'build' files like yml.
https://github.com/microsoft/ApplicationInspector/wiki/1.-CLI-Usage
For writing rules to match structured data files I can also recommend using the respective Path based queries for much higher fidelity than regex.
Let me know if that helps. Would be interested in any other feedback as well on rule authoring.
No further updates so looks like this is resolved for the issue author.
Describe the bug
Applying a custom rule against a YAML file, results in no matches, however, it should be matching correctly.
File in repository:
Expected behavior
Rule is matched.
Screenshots If applicable, add screenshots to help explain your problem.
demos/xd-trading-app » cat test.json | grep Internet -A 10 demos/xd-trading-app » cat test.json | grep Internet -A 10
Additional context
I was able to match the same value in a code file
.go
. But not with the yaml extension.