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

rule skipping for resources in k8s #455

Merged
merged 24 commits into from
Jan 8, 2021

Conversation

patilpankaj212
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jan 6, 2021

Codecov Report

Merging #455 (0ea7356) into master (0f79088) will increase coverage by 0.57%.
The diff coverage is 76.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #455      +/-   ##
==========================================
+ Coverage   74.11%   74.69%   +0.57%     
==========================================
  Files          87       88       +1     
  Lines        2013     2039      +26     
==========================================
+ Hits         1492     1523      +31     
+ Misses        388      382       -6     
- Partials      133      134       +1     
Impacted Files Coverage Δ
pkg/cli/register.go 6.25% <ø> (+2.25%) ⬆️
pkg/cli/scan.go 77.77% <0.00%> (ø)
pkg/policy/opa/engine.go 61.72% <0.00%> (-2.46%) ⬇️
pkg/cli/init.go 40.00% <50.00%> (+15.00%) ⬆️
pkg/iac-providers/kubernetes/v1/normalize.go 87.50% <100.00%> (+13.03%) ⬆️
pkg/iac-providers/terraform/v12/resource.go 66.66% <100.00%> (+1.66%) ⬆️
pkg/utils/skip_rules.go 100.00% <100.00%> (ø)


func readSkipRulesFromAnnotations(annotations map[string]interface{}, resourceID string) []string {

if _, ok := annotations[terrascanSkipRules]; !ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the assignment on 148 and just specify skipRulesFromAnnotations in place of _ here?

@sonarcloud
Copy link

sonarcloud bot commented Jan 8, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.3% 0.3% Duplication

@williepaul williepaul merged commit 20a4bdb into tenable:master Jan 8, 2021
@patilpankaj212 patilpankaj212 deleted the annotations-based-skipping branch May 18, 2021 05:35
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.

4 participants