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

Terrascan SARIF management #1103

Merged
merged 4 commits into from
Dec 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
"ACTIONLINT",
"ADDITIONAL",
"AFFERO",
"AGPA",
"AGPL",
"AIPA",
"AKIA",
"ANPA",
"ANVA",
"ARMTTK",
"AROA",
"Additional",
"Affero",
"Aftertabs",
Expand All @@ -31,6 +37,7 @@
"BETAID",
"BUILTINS",
"Bmegalinter",
"Braintree",
"Breporters",
"Bubley",
"CHECKOV",
Expand Down Expand Up @@ -82,6 +89,7 @@
"Dockerhub",
"Dockle",
"Dxml",
"Dynatrace",
"EDITORCONFIG",
"EEXIT",
"EMTEX",
Expand Down Expand Up @@ -113,6 +121,7 @@
"Hadolint",
"Hardcoding",
"Hashi",
"Hlwa",
"Hmegalinter",
"Htest",
"Hyph",
Expand Down Expand Up @@ -150,6 +159,8 @@
"MARKDOWNLINT",
"MODULEPATH",
"MPAF",
"Mailchimp",
"Mailgun",
"Mmegalinter",
"Moar",
"Mspell",
Expand Down Expand Up @@ -186,6 +197,7 @@
"Parallelly",
"Paren",
"Phive",
"Picatic",
"Pluggable",
"Positionals",
"Protolint",
Expand Down Expand Up @@ -262,6 +274,7 @@
"Thielemann",
"Tibanna",
"Trivy",
"Twilio",
"UNSECURE",
"VARNAME",
"VBDOTNET",
Expand Down Expand Up @@ -318,6 +331,7 @@
"babashka",
"backticks",
"backtrace",
"baprs",
"basename",
"basenames",
"basepath",
Expand All @@ -326,6 +340,7 @@
"bashdb",
"bbcoffeescript",
"bcbad",
"beautifulsoup",
"begingroup",
"behaviour",
"behaviours",
Expand Down Expand Up @@ -395,6 +410,7 @@
"columnsep",
"columnseprule",
"commandline",
"commentjson",
"compat",
"compojure",
"cond",
Expand Down Expand Up @@ -538,8 +554,10 @@
"gitlab",
"gitleaks",
"gitmodified",
"gitpython",
"gitstaged",
"gitter",
"giturlparse",
"globalrc",
"globbing",
"globby",
Expand Down Expand Up @@ -684,6 +702,8 @@
"luacheckrc",
"luajit",
"luarocks",
"mailchimp",
"mailgun",
"makeatletter",
"makeatother",
"makeconfig",
Expand Down Expand Up @@ -881,6 +901,7 @@
"pylint",
"pylint's",
"pymdownx",
"pypi",
"pyproject",
"pyreverse",
"pytablewriter",
Expand Down Expand Up @@ -976,6 +997,10 @@
"shopt",
"shortintertext",
"showversion",
"shpat",
"shpca",
"shppa",
"shpss",
"simplexml",
"slshape",
"smallskip",
Expand Down Expand Up @@ -1040,6 +1065,7 @@
"tekton",
"tektonlintrc",
"tempora",
"terminaltables",
"terragrunt",
"terrascan",
"testlinter",
Expand Down Expand Up @@ -1081,7 +1107,9 @@
"tsqllint",
"tsqllintrc",
"ttfamily",
"ttoken",
"twemoji",
"twilio",
"twocolumn",
"twolfson",
"typeof",
Expand Down Expand Up @@ -1110,6 +1138,7 @@
"utteranc",
"varfile",
"vbdotnet",
"vcmc",
"venv",
"verbatiminput",
"verbatimtab",
Expand All @@ -1125,6 +1154,7 @@
"vuln",
"warnon",
"wata",
"webpreview",
"weirdnesses",
"wemn",
"wgood",
Expand Down
9 changes: 9 additions & 0 deletions megalinter/descriptors/terraform.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ file_extensions:
linters:
# TFLINT
- linter_name: tflint
can_output_sarif: true
name: TERRAFORM_TFLINT
descriptor_flavors:
- terraform
Expand All @@ -20,6 +21,9 @@ linters:
pre_commands:
- command: tflint --init
cwd: workspace
cli_sarif_args:
- --format
- sarif
examples:
- "tflint myfile.tf"
- "tflint -c .tflint.hcl myfile.tf"
Expand All @@ -29,6 +33,7 @@ linters:
- COPY --from=tflint /usr/local/bin/tflint /usr/bin/
# TERRASCAN
- linter_name: terrascan
can_output_sarif: true
name: TERRAFORM_TERRASCAN
descriptor_flavors:
- terraform
Expand All @@ -44,6 +49,10 @@ linters:
- "terraform"
- "-t"
- "all"
cli_sarif_args:
- -o
- sarif
cli_lint_extra_args_after:
- "-f"
cli_version_arg_name: "version"
test_folder: terraform_terrascan
Expand Down