kics icon indicating copy to clipboard operation
kics copied to clipboard

feat(bicep): added support for ignore by comments in bicep test

Open cx-artur-ribeiro opened this issue 6 months ago • 7 comments

Closes #4420 Closes #7299

Note: The changes on this PR were originally done by a community member. The objective of this PR was to refactor and improve some of the code, as well as to test the implementation since the original PR was done in a private kics fork. I would like to personally congratulate JonasCorsen for taking the time to improve KICS and for making this effort! :fireworks:

Reason for Proposed Changes

  • Added support for on Bicep files for kics-scan comments , following the future-improvements notes;

Proposed Changes

  • Removed outdated information from the documentation and added new useful information on bicep comments files;
  • Users can now ignore lines by comments on the original bicep file;
  • Lines containing comments will now also be excluded from the scan;
  • Added a command to generate bicep antlr files to the Makefile;
  • Added Unit Tests to cover the new bicep behaviour;

I submit this contribution under the Apache-2.0 license.

cx-artur-ribeiro avatar Jun 16 '25 07:06 cx-artur-ribeiro

kics-logo

KICS version: v2.1.13

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 47
Queries failed to execute placeholder 0
Execution time placeholder 0

github-actions[bot] avatar Jun 16 '25 07:06 github-actions[bot]

Hi,

Just curious on the status of this and if I can help in anyway?

chielboogaard avatar Aug 08 '25 12:08 chielboogaard

Is there any way I can help with this? I would like to start implementing kics in my workflow.

chielboogaard avatar Sep 02 '25 09:09 chielboogaard

Hey @chielboogaard, thanks for checking in, and sorry for the delayed reply!

Right now we’re waiting on QA resources before we can move this feature forward, since a few other priorities are still in progress. Once we’re able to resume, I’ll make sure to update you. The issue and related PR will be closed once the implementation is merged.

I don’t think there’s much to be done here besides the QA process, but if something comes up where help is possible, I’ll definitely reach out.

Really appreciate your patience and your interest in improving KICS!

cx-artur-ribeiro avatar Sep 08 '25 08:09 cx-artur-ribeiro

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
20838717 Triggered Generic Password 8b3ea8f3f5ce0fa1fca35d4c2502871e7222fbd1 assets/queries/azureResourceManager/sql_server_database_with_alerts_disabled/test/negative8.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

gitguardian[bot] avatar Oct 07 '25 15:10 gitguardian[bot]

Hello @cx-artur-ribeiro

Do you hav any ETA on this?

JonasCordsen avatar Nov 12 '25 07:11 JonasCordsen

Hi @JonasCordsen, I haven't been able to arranje time to push this feature forward but there is already a task created and advanced to properly test and assure the quality of this implementation. As soon as we have the available resources we will tackle this.

Sorry for the delay!

P.S: Card ID AST-115979

cx-artur-ribeiro avatar Nov 12 '25 08:11 cx-artur-ribeiro

Sorry to bother you so close to the holidays but would still love to see this so we can start using Kics for my templates, do you have an ETA?

chielboogaard avatar Dec 23 '25 10:12 chielboogaard