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

fix(analyzer): discard possible Dockerfile when they are not actually a Dockerfile #5470

Merged
merged 2 commits into from
Jun 22, 2022
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
2 changes: 1 addition & 1 deletion docs/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Lines scanned are the lines of the files that were scanned, in the first instanc

## RESOURCE TYPE AND RESOURCE NAME

KICS presents the resource type and the resource name fields in the JSON result of each query. These fields are available for the following platforms: Ansible, Azure Resource Manager, Kubernetes, and Google Deployment Manager.
KICS presents the resource type and the resource name fields in the JSON result of each query. These fields are available for the following platforms: Ansible, Azure Resource Manager, CloudFormation, Kubernetes, Google Deployment Manager, and Terraform.

```
{
Expand Down
2 changes: 2 additions & 0 deletions pkg/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ func (a *analyzerInfo) worker(results, unwanted chan<- string, wg *sync.WaitGrou
case "possibleDockerfile", ".ubi8", ".debian":
if (typesFlag[0] == "" || utils.Contains(dockerfile, typesFlag)) && isDockerfile(a.filePath) {
results <- dockerfile
} else {
unwanted <- a.filePath
}
// Terraform
case ".tf", "tfvars":
Expand Down