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

Adds support to scan config resources with applicable policies & Refactors filteration #803

Merged
merged 7 commits into from
Jun 3, 2021

Conversation

patilpankaj212
Copy link
Contributor

  1. Better Rego Metadata filters and unit tests
  2. Scan config resources with only applicable polices

@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #803 (e673b2f) into master (95aba12) will increase coverage by 0.09%.
The diff coverage is 97.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #803      +/-   ##
==========================================
+ Coverage   78.22%   78.32%   +0.09%     
==========================================
  Files         162      164       +2     
  Lines        4354     4382      +28     
==========================================
+ Hits         3406     3432      +26     
- Misses        734      735       +1     
- Partials      214      215       +1     
Impacted Files Coverage Δ
pkg/policy/types.go 100.00% <ø> (ø)
pkg/filters/filter-specs.go 92.30% <92.30%> (ø)
pkg/filters/filters.go 100.00% <100.00%> (ø)
pkg/policy/opa/engine.go 59.36% <100.00%> (-5.04%) ⬇️
pkg/runtime/executor.go 89.65% <100.00%> (+0.08%) ⬆️
pkg/runtime/validate.go 91.93% <100.00%> (ø)
pkg/utils/policy.go 70.00% <100.00%> (+20.00%) ⬆️

Copy link
Contributor

@devang-gaur devang-gaur left a comment

Choose a reason for hiding this comment

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

Overall its a good refactor! Requested some minor changes.

pkg/filters/filter-specs.go Outdated Show resolved Hide resolved
pkg/filters/filter-specs.go Outdated Show resolved Hide resolved
pkg/policy/opa/engine.go Outdated Show resolved Hide resolved
pkg/runtime/executor.go Outdated Show resolved Hide resolved
pkg/runtime/executor.go Outdated Show resolved Hide resolved
pkg/runtime/executor.go Outdated Show resolved Hide resolved
@devang-gaur
Copy link
Contributor

We can also add the phrase "Filtering Refactor" in the PR title.

@sonarcloud
Copy link

sonarcloud bot commented Jun 3, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@devang-gaur devang-gaur changed the title Adds support to scan config resources with applicable policies Adds support to scan config resources with applicable policies & Refactors filteration Jun 3, 2021
@devang-gaur devang-gaur merged commit 5f4b15a into tenable:master Jun 3, 2021
@patilpankaj212 patilpankaj212 deleted the regometada-filters branch May 5, 2022 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

show-passed should report passes only for the existing resources
3 participants