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

chore: bump defsec and trivy-policies #33

Merged
merged 5 commits into from
Oct 24, 2023

Conversation

nikpivkin
Copy link
Collaborator

@nikpivkin nikpivkin commented Oct 19, 2023

@nikpivkin nikpivkin marked this pull request as ready for review October 23, 2023 08:06
@nikpivkin nikpivkin requested a review from simar7 as a code owner October 23, 2023 08:06
Comment on lines +27 to +42
// func TestRulesAgainstExampleCode(t *testing.T) {
// for _, rule := range rules.GetRegistered(framework.ALL) {
// testName := fmt.Sprintf("%s/%s", rule.GetRule().AVDID, rule.LongID())
// t.Run(testName, func(t *testing.T) {
// rule := rule
// t.Parallel()

// t.Run("avd docs", func(t *testing.T) {
// provider := strings.ToLower(rule.GetRule().Provider.ConstName())
// service := strings.ToLower(strings.ReplaceAll(rule.GetRule().Service, "-", ""))
// _, err := os.Stat(filepath.Join("..", "avd_docs", provider, service, rule.GetRule().AVDID, "docs.md"))
// require.NoError(t, err)
// })
// })
// }
// }
Copy link
Member

Choose a reason for hiding this comment

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

why is this commented out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@simar7 To perform this test, we need to generate documentation. Should I generate it as part of this PR?

Copy link
Member

Choose a reason for hiding this comment

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

I see - let's do it in a separate PR then otherwise it will clutter this PR.

@simar7 simar7 merged commit 4e7ad26 into aquasecurity:schema-gen Oct 24, 2023
3 checks passed
simar7 pushed a commit that referenced this pull request Oct 24, 2023
* bump defsec and trivy-policies

* test: use embedded FS

* refactor: use embedded FS to generate documentation

* chore: bump defsec and trivy-policies

* refactor: use registered rules as is
simar7 pushed a commit that referenced this pull request Oct 24, 2023
* bump defsec and trivy-policies

* test: use embedded FS

* refactor: use embedded FS to generate documentation

* chore: bump defsec and trivy-policies

* refactor: use registered rules as is
simar7 added a commit that referenced this pull request Oct 25, 2023
* feat(schema): Add schema generation

* mv pkg/rego and pkg/rules from trivy-policies

* update go mod

* mv internal/rules/ pkg

* update schema ids

* remove trivy-policies/pkg/rego imports

* fix schema json

* fix cyclic dependency

* fix Test_OS_FS

* chore: bump defsec and trivy-policies (#33)

* bump defsec and trivy-policies

* test: use embedded FS

* refactor: use embedded FS to generate documentation

* chore: bump defsec and trivy-policies

* refactor: use registered rules as is

---------

Co-authored-by: Nikita Pivkin <nikita.pivkin@smartforce.io>
@nikpivkin nikpivkin deleted the schema-gen-n branch November 2, 2023 10:07
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.

2 participants