From 45c0b3c5947c94b2852c59ee52c773242f16dad9 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Fri, 31 May 2024 22:19:07 +0700 Subject: [PATCH] chore: migrate to Trivy --- .github/workflows/generate-html.yaml | 3 --- .gitignore | 2 +- Makefile | 15 +++++++-------- out/cloud/cloud.html | 2 +- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/generate-html.yaml b/.github/workflows/generate-html.yaml index cac1f4d..09d9dd2 100644 --- a/.github/workflows/generate-html.yaml +++ b/.github/workflows/generate-html.yaml @@ -21,9 +21,6 @@ jobs: - name: Install Dependencies run: pip install json-schema-for-humans==0.47 - - name: Clone Repository - run: make clone-repo - - name: Generate HTML run: make generate-html diff --git a/.gitignore b/.gitignore index 2f54304..9851b63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .idea -defsec +env **/.DS_Store \ No newline at end of file diff --git a/Makefile b/Makefile index 3f042e4..0ff73df 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,12 @@ SCHEMA_CONFIG_FILE=./config/config.yaml -PATH_TO_SCHEMAS=./defsec/pkg/rego/schemas SCHEMAS=dockerfile kubernetes cloud rbac OUT_DIRECTORY=out generate-html: - @for schema in $(SCHEMAS); do \ - mkdir -p out/$$schema; \ - generate-schema-doc --config-file $(SCHEMA_CONFIG_FILE) $(PATH_TO_SCHEMAS)/$$schema.json $(OUT_DIRECTORY)/$$schema; \ - done - -clone-repo: - git clone https://github.com/aquasecurity/defsec + @tmpdep=`mktemp -d`; \ + trap 'rm -rf $$tmpdep' EXIT; \ + for schema in $(SCHEMAS); do \ + wget -q -O $$tmpdep/$$schema.json https://raw.githubusercontent.com/aquasecurity/trivy/main/pkg/iac/rego/schemas/$$schema.json; \ + mkdir -p $(OUT_DIRECTORY)/$$schema; \ + generate-schema-doc --config-file $(SCHEMA_CONFIG_FILE) $$tmpdep/$$schema.json $(OUT_DIRECTORY)/$$schema; \ + done \ No newline at end of file diff --git a/out/cloud/cloud.html b/out/cloud/cloud.html index 35b4451..ebf5363 100644 --- a/out/cloud/cloud.html +++ b/out/cloud/cloud.html @@ -1 +1 @@ - Schema Docs
Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

\ No newline at end of file + Schema Docs
Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: object

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: array of object
No Additional Items

Each item of this array must be:

Type: object

Type: object

\ No newline at end of file