Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ansible): playbook scanning; allow Ansible scanning for both YAML and YML files #7110

Open
davejdeemer opened this issue Jun 5, 2024 · 0 comments
Labels
ansible Ansible query community Community contribution feature request Community: new feature request

Comments

@davejdeemer
Copy link

Is your feature request related to a problem? Please describe.
Many of our Ansible-based repos use the YML file extension for our ansible files and these are not recognized by Kics Ansible scanning. I have experimented with kics and found that when I change one (or more) playbook or task files from YML to YAML, kics may or may not understand these as Ansible (I haven't found a pattern for what triggers Ansible scanning -- on the surface it appears that when I change a task file from YML to YAML, kics has a higher probability to pick up the remaining files as Ansible).

Describe the solution you'd like
When specifying the scan type of Ansible, I would like kics to scan the repo and all subsequent YML files (or YAML if mixed with YML file extensions) as Ansible. Essentially, when explicitly specifying Ansible; that is what kics should scan as.

Describe alternatives you've considered
I considered renaming all playbook and task files from YML to YAML file extension names but I'd prefer not to (and ultimately decided against it).

Another alternative might be to have the file extension configurable; keep the default/current behavior but have a config flag to allow explicit filename extension values.

Additional context
The kics documentation is fairly clear that it only supports YAML files for Ansible scanning. What I found interesting was that I was able to nudge kics to sometimes scan YML files as Ansible (as mentioned above, I did not find the exact pattern that triggered it).

@davejdeemer davejdeemer added community Community contribution feature request Community: new feature request labels Jun 5, 2024
@github-actions github-actions bot added the ansible Ansible query label Jun 5, 2024
@davejdeemer davejdeemer changed the title Ansible playbook scanning: Allow Ansible scanning for both YAML and YML files feature(ansible): Playbook scanning; allow Ansible scanning for both YAML and YML files Jun 5, 2024
@davejdeemer davejdeemer changed the title feature(ansible): Playbook scanning; allow Ansible scanning for both YAML and YML files feat(ansible): Playbook scanning; allow Ansible scanning for both YAML and YML files Jun 5, 2024
@davejdeemer davejdeemer changed the title feat(ansible): Playbook scanning; allow Ansible scanning for both YAML and YML files feat(ansible): playbook scanning; allow Ansible scanning for both YAML and YML files Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Ansible query community Community contribution feature request Community: new feature request
Projects
None yet
Development

No branches or pull requests

1 participant