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

feat: add support for CRITICAL severity type #92

Merged

Conversation

kei711
Copy link
Contributor

@kei711 kei711 commented Apr 8, 2022

This pull request fixes a bug described below.

The tfsec result contains a CRITICAL severity type.
However, there is no route to convert it to reviewdog format, so the following error occurs
reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: (line 1:1197): invalid value for enum type: ""


Refs: reviewdog severity types:

Example tfsec output for CRITICAL severity type:

		{
			"rule_id": "AVD-GCP-0044",
			"long_id": "google-compute-no-default-service-account",
			"rule_description": "Instances should not use the default service account",
			"rule_provider": "google",
			"rule_service": "compute",
			"impact": "Instance has full access to the project",
			"resolution": "Remove use of default service account",
			"links": [
				"https://aquasecurity.github.io/tfsec/v1.15.4/checks/google/compute/no-default-service-account/",
				"https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#"
			],
			"description": "Instance uses the default service account.",
			"severity": "CRITICAL",
			"status": 0,
			"resource": "google_compute_instance.vm",
			"location": {
				"filename": "/home/runner/work/terraform/main.tf",
				"start_line": 114,
				"end_line": 117
			}
		},

@kei711 kei711 marked this pull request as draft April 8, 2022 16:15
@kei711 kei711 force-pushed the feature/severity-critical branch from 24a1c6c to c7a5e36 Compare April 8, 2022 16:40
@kei711 kei711 marked this pull request as ready for review April 8, 2022 16:43
@suzuki-shunsuke
Copy link
Owner

Thank you for your contribution!

@suzuki-shunsuke suzuki-shunsuke added the bug Something isn't working label Apr 8, 2022
@suzuki-shunsuke suzuki-shunsuke added this to the v0.1.6 milestone Apr 8, 2022
@suzuki-shunsuke suzuki-shunsuke self-requested a review April 8, 2022 22:39
@suzuki-shunsuke suzuki-shunsuke merged commit 657cad0 into suzuki-shunsuke:main Apr 8, 2022
@suzuki-shunsuke
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants