mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
refactor(misconf): remove unused methods for ec2.Instance (#8536)
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
This commit is contained in:
2
go.mod
2
go.mod
@@ -94,7 +94,7 @@ require (
|
||||
github.com/openvex/discovery v0.1.1-0.20240802171711-7c54efc57553
|
||||
github.com/openvex/go-vex v0.2.5
|
||||
github.com/owenrumney/go-sarif/v2 v2.3.3
|
||||
github.com/owenrumney/squealer v1.2.11
|
||||
github.com/owenrumney/squealer v1.2.11 // indirect
|
||||
github.com/package-url/packageurl-go v0.1.3
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.22
|
||||
github.com/rust-secure-code/go-rustaudit v0.0.0-20250226111315-e20ec32e963c
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package ec2
|
||||
|
||||
import (
|
||||
"github.com/owenrumney/squealer/pkg/squealer"
|
||||
|
||||
iacTypes "github.com/aquasecurity/trivy/pkg/iac/types"
|
||||
)
|
||||
|
||||
@@ -40,16 +38,3 @@ func NewInstance(metadata iacTypes.Metadata) *Instance {
|
||||
EBSBlockDevices: nil,
|
||||
}
|
||||
}
|
||||
|
||||
func (i *Instance) RequiresIMDSToken() bool {
|
||||
return i.MetadataOptions.HttpTokens.EqualTo("required")
|
||||
}
|
||||
|
||||
func (i *Instance) HasHTTPEndpointDisabled() bool {
|
||||
return i.MetadataOptions.HttpEndpoint.EqualTo("disabled")
|
||||
}
|
||||
|
||||
func (i *Instance) HasSensitiveInformationInUserData() bool {
|
||||
scanner := squealer.NewStringScanner()
|
||||
return scanner.Scan(i.UserData.Value()).TransgressionFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user