Skip to content

Commit

Permalink
chore: update defsec to v0.72.0 (#1861)
Browse files Browse the repository at this point in the history
* chore: update defsec to v0.72.0
  • Loading branch information
liamg committed Aug 19, 2022
1 parent 35c9bc8 commit 6b7fd1a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/guides/usage.md
Expand Up @@ -47,7 +47,7 @@ For a richer experience, there are many additional command line arguments that y
| `--soft-fail` | `-s` | Runs checks but suppresses error code |
| `--tfvars-file strings` | | Path to .tfvars file, can be used multiple times and evaluated in order of specification |
| `--update` | | Update to latest version |
| `--var-file strings` | | Path to .tfvars file, can be used multiple times and evaluated in order of specification (same functionaility as --tfvars-file but consistent with Terraform) |
| `--var-file strings` | | Path to .tfvars file, can be used multiple times and evaluated in order of specification (same functionality as --tfvars-file but consistent with Terraform) |
| `--verbose` | | Enable verbose logging (same as debug) |
| `--version` | `-v` | Show version information and exit |
| `--workspace string` | `-w` | Specify a workspace for ignore limits (default "default") |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/AlecAivazis/survey/v2 v2.3.5
github.com/Masterminds/semver v1.5.0
github.com/aquasecurity/defsec v0.71.11
github.com/aquasecurity/defsec v0.72.0
github.com/google/uuid v1.3.0
github.com/hashicorp/go-version v1.6.0
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -142,8 +142,8 @@ github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/Y
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
github.com/aquasecurity/defsec v0.71.11 h1:XPQwGtxcaTd1IdVW5FkFKkNHKEVTT+6wu3g8WirYSNw=
github.com/aquasecurity/defsec v0.71.11/go.mod h1:2jYgkIi3UFbkrbtpnr3Cu49JZ3MGuLMJAhyh63jV1I4=
github.com/aquasecurity/defsec v0.72.0 h1:bI7LCPIhdUFPaKv4pz3FAc0GJ09JUtIHB035gaQDztI=
github.com/aquasecurity/defsec v0.72.0/go.mod h1:2jYgkIi3UFbkrbtpnr3Cu49JZ3MGuLMJAhyh63jV1I4=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
Expand Down
2 changes: 1 addition & 1 deletion internal/app/tfsec/cmd/flags.go
Expand Up @@ -79,7 +79,7 @@ func configureFlags(cmd *cobra.Command) {
cmd.Flags().StringVar(&filterResults, "filter-results", "", "Filter results to return specific checks only (supports comma-delimited input).")
cmd.Flags().BoolVarP(&softFail, "soft-fail", "s", false, "Runs checks but suppresses error code")
cmd.Flags().StringSliceVar(&tfvarsPaths, "tfvars-file", nil, "Path to .tfvars file, can be used multiple times and evaluated in order of specification")
cmd.Flags().StringSliceVar(&tfvarsPaths, "var-file", nil, "Path to .tfvars file, can be used multiple times and evaluated in order of specification (same functionaility as --tfvars-file but consistent with Terraform)")
cmd.Flags().StringSliceVar(&tfvarsPaths, "var-file", nil, "Path to .tfvars file, can be used multiple times and evaluated in order of specification (same functionality as --tfvars-file but consistent with Terraform)")
cmd.Flags().StringSliceVar(&excludePaths, "exclude-path", nil, "Folder path to exclude, can be used multiple times and evaluated in order of specification")
cmd.Flags().StringVarP(&outputFlag, "out", "O", "", "Set output file. This filename will have a format descriptor appended if multiple formats are specified with --format")
cmd.Flags().StringVar(&customCheckDir, "custom-check-dir", "", "Explicitly set the custom checks dir location")
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/formatter/default.go
Expand Up @@ -181,7 +181,7 @@ func printResult(b formatters.ConfigurableFormatter, group formatters.GroupedRes
}

via := getOccurrences(first, b.BaseDir())
filename := b.Path(first)
filename := b.Path(first, first.Metadata())

_ = tml.Fprintf(
w,
Expand Down Expand Up @@ -239,7 +239,7 @@ func printResult(b formatters.ConfigurableFormatter, group formatters.GroupedRes
causeMap := make(map[string]int)
for _, result := range group.Results() {

niceFilename := b.Path(result)
niceFilename := b.Path(result, result.Metadata())

m := result.Metadata()
metadata := &m
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/formatter/html.go
Expand Up @@ -93,7 +93,7 @@ func printResultsTableHTML(b formatters.ConfigurableFormatter, title string, res
`)
for i, result := range results {
desc := strings.ReplaceAll(result.Description(), "\n", "<br>")
location := fmt.Sprintf("%s:%d", b.Path(result), result.Range().GetStartLine())
location := fmt.Sprintf("%s:%d", b.Path(result, result.Metadata()), result.Range().GetStartLine())
if result.Range().GetEndLine() > result.Range().GetStartLine() {
location = fmt.Sprintf("%s-%d", location, result.Range().GetEndLine())
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/formatter/markdown.go
Expand Up @@ -40,7 +40,7 @@ func printResultsTableMarkdown(b formatters.ConfigurableFormatter, title string,
_, _ = fmt.Fprintf(b.Writer(), "|---|----|----------|-------|----------|-------------|\n")
for i, result := range results {
desc := strings.ReplaceAll(result.Description(), "\n", "<br>")
location := fmt.Sprintf("%s:%d", b.Path(result), result.Range().GetStartLine())
location := fmt.Sprintf("%s:%d", b.Path(result, result.Metadata()), result.Range().GetStartLine())
if result.Range().GetEndLine() > result.Range().GetStartLine() {
location = fmt.Sprintf("%s-%d", location, result.Range().GetEndLine())
}
Expand Down

0 comments on commit 6b7fd1a

Please sign in to comment.