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

fix(query): refine missing_app_armor_config k8s rule to operate on specific containers #4895

Merged
merged 5 commits into from
Mar 24, 2022

Conversation

Churro
Copy link
Contributor

@Churro Churro commented Feb 27, 2022

Problem

  • The current rule only works on pods
  • There is no check whether AppArmor is configured for each container
  • There is no check whether the provided AppArmor profile is reasonable

Proposed Changes

  • An implementation that addresses the issues described above.

I submit this contribution under the Apache-2.0 license.

@kicsbot
Copy link
Contributor

kicsbot commented Feb 27, 2022

Scan submitted to Checkmarx

@kicsbot
Copy link
Contributor

kicsbot commented Mar 9, 2022

Logo
Checkmarx SAST - Scan Summary & Details

Cx-SAST Summary

Total of 5 vulnerabilities
High 0 High
Medium 0 Medium
Low 5 Low
Info 0 Info

Violation Summary

No policy violation found

@rafaela-soares rafaela-soares added query New query feature community Community contribution labels Mar 15, 2022
@rafaela-soares
Copy link
Contributor

Hi @Churro!

Thank you so much for being so active and contributing to KICS! Your work improved a lot the K8s queries 🚀 We are very grateful!

This PR is almost ready to be another great contribution. For that, the PR should not fail in the unit tests. Please, merge the master in the branch. After that, run the command go test ./test and observe the output of it, please.

image

It reports that the positive_expected_result.json is incorrect. Can you take a look, please?

@Churro
Copy link
Contributor Author

Churro commented Mar 23, 2022

@rafaela-soares! You're right, thanks for highlighting these issues. I've addressed them now in another commit and it seems to have helped that the tests can finally run through. Obrigado!

Copy link
Contributor

@rafaela-soares rafaela-soares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 Muito obrigada, @Churro!

@rafaela-soares rafaela-soares merged commit e496e88 into Checkmarx:master Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution query New query feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants