Skip to content

bug (scan): problem with Gitlab Components and the --exclude-paths parameter #7608

@J4nni

Description

@J4nni

Hello,

have a problem importing via a GitLab Component with Kics.

My Component:"

Image

I've also tried using the --exclude-paths parameter with ${PWD}/* or ${PWD}//. It works correctly in the CI/CD project itself, where it recognizes the exclude path during import. However, as shown below, I still encounter errors related to the 'Molecule' path."

Expected Behavior

ignore the playbook.yml finding, thats for testing in the component itself.

It is the include job in the component Project. Here it works.

Image

The import in the .gitlab-ci.yml

Image

Actual Behavior

Image

Steps to Reproduce the Problem

  1. Create a Gitlab Component, like mine with exclude Paths
  2. Include in .gitlab-ci.yml, create the exclude path with some bad practice ansible,terraform whatever code.
  • Version: kics=2.1.12, gitlab 18.21
  • Platform: Linux
  • Subsystem:

Metadata

Metadata

Assignees

No one assigned

    Labels

    ansibleAnsible querybugSomething isn't workingcommunityCommunity contributionterraformTerraform query

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions