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
Describe in details what the problem is
When I scan nginx.conf file following 2 lines creates parsing error
add_header X-XSS-Protection "1; mode=block" always; << in Server block
proxy_pass http://localhost:8080/; << in Location block
Attach a log file with relevant data preferably in DEBUG level (--log-level=DEBUG)
7:47PM INF Scanning with Keeping Infrastructure as Code Secure v2.1.7
7:47PM INF Operating system: linux
7:47PM INF Total memory: 1.9G
7:47PM INF CPU: 12.0
7:47PM INF Max file size permitted for scanning: 5 MB
7:47PM INF Max resolver depth permitted for resolving files: 15
7:47PM INF Total files in the project: 1
7:47PM INF Loading queries of type: ansible
7:47PM INF Inspector initialized, number of queries=285
7:47PM INF Query execution timeout=1m0s
Preparing Scan Assets: Done
7:47PM ERR failed to parse file content: /tmp/templates/nginx.conf error="missing section header: 68 proxy_pass http://localhost8080/;"
Executing queries: [---------------------------------------------------] 100.00%
Attach the scanned sample files, anonymize the data if the original file cannot be provided
When attaching files to the issue make sure they are properly formatted
Expected Behavior
Scan should succeed
(Which results are expected from KICS?)
Actual Behavior
(Formatted logs and samples helps us to better understand the issue)
Err => failed to parse file contents
Steps to Reproduce the Problem
(Command line arguments and flags used)
Scan any nginx conf file by adding
add_header X-XSS-Protection "1; mode=block" always; << in Server block
proxy_pass http://localhost:8080/; << in Location block
Kicks will fail to parse.
Remove "=" and ":" characters from these lines. Scanning will succeed.
Specifications
(N/A if not applicable)
Version: 2.1.7
Platform: Linux
Subsystem: Docker image
The text was updated successfully, but these errors were encountered:
bsangwan
changed the title
bug: Nginx.conf file scanning error out for "=" and ":" characters
bug<linux>: nginx.conf file scanning error out for "=" and ":" characters
May 20, 2025
bsangwan
changed the title
bug<linux>: nginx.conf file scanning error out for "=" and ":" characters
bug(linux): nginx.conf file scanning error out for "=" and ":" characters
May 20, 2025
Found a bug? You're welcome to
Describe in details what the problem is
When I scan nginx.conf file following 2 lines creates parsing error
add_header X-XSS-Protection "1; mode=block" always; << in Server block
proxy_pass http://localhost:8080/; << in Location block
Attach a log file with relevant data preferably in DEBUG level (
--log-level=DEBUG
)7:47PM INF Scanning with Keeping Infrastructure as Code Secure v2.1.7
7:47PM INF Operating system: linux
7:47PM INF Total memory: 1.9G
7:47PM INF CPU: 12.0
7:47PM INF Max file size permitted for scanning: 5 MB
7:47PM INF Max resolver depth permitted for resolving files: 15
7:47PM INF Total files in the project: 1
7:47PM INF Loading queries of type: ansible
7:47PM INF Inspector initialized, number of queries=285
7:47PM INF Query execution timeout=1m0s
Preparing Scan Assets: Done
7:47PM ERR failed to parse file content: /tmp/templates/nginx.conf error="missing section header: 68 proxy_pass http://localhost8080/;"
Executing queries: [---------------------------------------------------] 100.00%
Expected Behavior
Scan should succeed
(Which results are expected from KICS?)
Actual Behavior
(Formatted logs and samples helps us to better understand the issue)
Err => failed to parse file contents
Steps to Reproduce the Problem
(Command line arguments and flags used)
add_header X-XSS-Protection "1; mode=block" always; << in Server block
proxy_pass http://localhost:8080/; << in Location block
Specifications
(N/A if not applicable)
The text was updated successfully, but these errors were encountered: