Skip to content

Commit cccaa15

Browse files
authored
chore: sort supported AWS services (#5570)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
1 parent 3891e3d commit cccaa15

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/docs/references/configuration/cli/trivy_aws.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
Scan an AWS account for misconfigurations. Trivy uses the same authentication methods as the AWS CLI. See https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
88

99
The following services are supported:
10+
1011
- accessanalyzer
1112
- api-gateway
1213
- athena

pkg/commands/app.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io"
88
"os"
9+
"sort"
910
"strings"
1011
"time"
1112

@@ -972,6 +973,7 @@ func NewAWSCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
972973
}
973974

974975
services := awsScanner.AllSupportedServices()
976+
sort.Strings(services)
975977

976978
cmd := &cobra.Command{
977979
Use: "aws [flags]",
@@ -982,6 +984,7 @@ func NewAWSCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command {
982984
Long: fmt.Sprintf(`Scan an AWS account for misconfigurations. Trivy uses the same authentication methods as the AWS CLI. See https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
983985
984986
The following services are supported:
987+
985988
- %s
986989
`, strings.Join(services, "\n- ")),
987990
Example: ` # basic scanning

0 commit comments

Comments
 (0)