-
Notifications
You must be signed in to change notification settings - Fork 365
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The following regex in applies_to_file_regex doesn't work properly:
^(?!\/.configuration$)\/.+\/.configuration$
The regex search .configuration files in folders or subfolders but not in the root, using the following rule:
{
"name": "DES",
"id": "DES1",
"description": "This is a description",
"applies_to_file_regex": [
"^(?!\\/.configuration$)\\/.+\\/.configuration$"
],
"tags": [
"Configuration"
],
"severity": "critical",
"patterns": [
{
"pattern": "^",
"type": "regex",
"scopes": [
"all"
],
"modifiers": [],
"confidence": "high"
}
]
}
Inspector detects the root file:
I tested the regex using an online regex tester and seems to be ok:
To Reproduce
- Create rule and folder with .configuration file
- Run inspector with analyze with HTML output
Expected behavior
The root file won't be detected by Inspector using the regex expression.
Operating Environment (please complete the following information):
- Application Inspector Version: 1.9.22
- OS: MacOS 14.5 using docker image mcr.microsoft.com/dotnet/sdk:8.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

