Skip to content

Commit

Permalink
feat: disable RPM archive analyzer unless env is set
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <knqyf263@gmail.com>
  • Loading branch information
knqyf263 committed Oct 2, 2024
1 parent 2f34afc commit 981a8b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/commands/artifact/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"os"
"slices"

"github.com/hashicorp/go-multierror"
Expand Down Expand Up @@ -457,6 +458,12 @@ func disabledAnalyzers(opts flag.Options) []analyzer.Type {
analyzers = append(analyzers, analyzer.TypeExecutable)
}

// Disable RPM archive analyzer unless the environment variable is set
// TODO: add '--enable-analyzers' and delete this environment variable
if os.Getenv("TRIVY_EXPERIMENTAL_RPM_ARCHIVE") == "" {
analyzers = append(analyzers, analyzer.TypeRpmArchive)
}

return analyzers
}

Expand Down

0 comments on commit 981a8b3

Please sign in to comment.