Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

feat: k8s policy subtype support #1502

Merged

Conversation

chen-keinan
Copy link
Contributor

@chen-keinan chen-keinan requested a review from simar7 as a code owner November 29, 2023 11:53
@simar7
Copy link
Member

simar7 commented Nov 29, 2023

Couple of points on this:

  1. We have a test for this here if you can update that test and use the latest defsec within trivy-iac to try it out, it'll be great.
  2. We might also need to revisit this

    defsec/pkg/rego/scanner.go

    Lines 299 to 306 in d640376

    case string: // k8s
    // TODO(simar): This logic probably needs to be revisited
    if services == st.Group ||
    services == st.Version ||
    services == st.Kind {
    return true
    }
    }

@chen-keinan
Copy link
Contributor Author

Couple of points on this:

  1. We have a test for this here if you can update that test and use the latest defsec within trivy-iac to try it out, it'll be great.
  2. We might also need to revisit this

    defsec/pkg/rego/scanner.go

    Lines 299 to 306 in d640376

    case string: // k8s
    // TODO(simar): This logic probably needs to be revisited
    if services == st.Group ||
    services == st.Version ||
    services == st.Kind {
    return true
    }
    }

@simar7 I assume this need to be done after merging the PR and updating trivy-iac dep.

@simar7
Copy link
Member

simar7 commented Dec 1, 2023

Couple of points on this:

  1. We have a test for this here if you can update that test and use the latest defsec within trivy-iac to try it out, it'll be great.
  2. We might also need to revisit this

    defsec/pkg/rego/scanner.go

    Lines 299 to 306 in d640376

    case string: // k8s
    // TODO(simar): This logic probably needs to be revisited
    if services == st.Group ||
    services == st.Version ||
    services == st.Kind {
    return true
    }
    }

@simar7 I assume this need to be done after merging the PR and updating trivy-iac dep.

Sure just wanted to remind. You can add it later or you can use this SHA as a commit hash to test this while adding the testcase. But I assume you've tested it locally.

@simar7 simar7 merged commit 455085f into aquasecurity:master Dec 1, 2023
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants