Documentation ¶
Index ¶
- Constants
- Variables
- func DeepfenceRule2json(input []DeepfenceRule) []map[string]any
- func DeleteFileMinio(ctx context.Context, fName string) error
- func DownloadAndPopulateCloudControls(ctx context.Context, entry Entry) error
- func DownloadMalwareRules(ctx context.Context, entry Entry) error
- func DownloadSecretsRules(ctx context.Context, entry Entry) error
- func DownloadVulnerabilityDB(ctx context.Context, info Entry) error
- func ExportYaraRules(outDir string, rules []DeepfenceRule, extra []string)
- func ExposeFile(ctx context.Context, fName string, consoleURL string, ...) (string, error)
- func ExtractDFRules2NativeRules(inpath, outdir string) error
- func FetchCloudPostureControlsURL(ctx context.Context, consoleURL string, ...) (string, string, error)
- func FetchMalwareRulesInfo(ctx context.Context) (path, hash string, err error)
- func FetchMalwareRulesURL(ctx context.Context, consoleURL string, ...) (string, string, error)
- func FetchPostureControlsInfo(ctx context.Context) (path, hash string, err error)
- func FetchSecretsRulesInfo(ctx context.Context) (path, hash string, err error)
- func FetchSecretsRulesURL(ctx context.Context, consoleURL string, ...) (string, string, error)
- func IngestMalwareRules(ctx context.Context, content []byte) error
- func IngestSecretRules(ctx context.Context, content []byte) error
- func ProcessTarGz(content []byte, processFile func(header *tar.Header, reader io.Reader) error) error
- func TriggerLoadCloudControls(ctx context.Context) error
- func UpdateMalwareRulesInfo(ctx context.Context, hash, path string) error
- func UpdatePostureControlsInfo(ctx context.Context, hash, path string) error
- func UpdateSecretsRulesInfo(ctx context.Context, hash, path string) error
- func UploadToMinio(ctx context.Context, fb []byte, dbPath, fName string) (string, string, error)
- func VulnDBUpdateListing(ctx context.Context, newFile, newFileCheckSum string, buildTime time.Time) error
- type Artefact
- type DBUploadRequest
- type Database
- type DeepfenceRule
- type Entry
- type FeedsBundle
- func (fb *FeedsBundle) AddCloudComplianceRules(df []DeepfenceRule)
- func (fb *FeedsBundle) AddComplianceRules(df []DeepfenceRule)
- func (fb *FeedsBundle) AddFilesystemRules(df []DeepfenceRule)
- func (fb *FeedsBundle) AddMalwareRules(df []DeepfenceRule)
- func (fb *FeedsBundle) AddNetworkRules(df ...DeepfenceRule)
- func (fb *FeedsBundle) AddProcessRules(df []DeepfenceRule)
- func (fb *FeedsBundle) AddSecretRules(df []DeepfenceRule)
- func (fb *FeedsBundle) AddTracerArtefacts(df []Artefact)
- func (fb *FeedsBundle) AddVulnerabilityRules(df []DeepfenceRule)
- func (fb *FeedsBundle) RemoveAllTypeNetworkRules(t string)
- type Listing
- type ScannerFeeds
- type TracerFeeds
- type VulnerabilityDBListing
- func (v *VulnerabilityDBListing) Append(db Database, version string)
- func (v *VulnerabilityDBListing) Bytes() ([]byte, error)
- func (v *VulnerabilityDBListing) Latest(version string) *Database
- func (v *VulnerabilityDBListing) LatestN(version string, num int) (latest []Database, oldest []Database)
- func (v *VulnerabilityDBListing) Set(dbs []Database, version string)
- func (v *VulnerabilityDBListing) Sort(version string)
Constants ¶
View Source
const ( // database types DBTypeVulnerability = "vulnerability" DBTypeSecrets = "secret" DBTypeMalware = "malware" DBTypePosture = "posture" VulnerabilityRuleJSONFileName = "vulnerability.json" )
View Source
const ( Version3 = "3" Version5 = "5" )
View Source
const (
MalwareRulesStore = "malware"
)
View Source
const (
SecretsRulesStore = "secrets"
)
Variables ¶
View Source
var ( ListingJSON = "listing.json" VulnerabilityDBStore = "vulnerability" ListingPath = path.Join(VulnerabilityDBStore, ListingJSON) )
View Source
var ErrDatabaseNotFound = errors.New("database type not found")
View Source
var (
PostureControlsStore = "posture"
)
Functions ¶
func DeepfenceRule2json ¶
func DeepfenceRule2json(input []DeepfenceRule) []map[string]any
func ExportYaraRules ¶
func ExportYaraRules(outDir string, rules []DeepfenceRule, extra []string)
func ExposeFile ¶
func FetchMalwareRulesInfo ¶
func FetchMalwareRulesURL ¶
func FetchSecretsRulesInfo ¶
func FetchSecretsRulesURL ¶
func ProcessTarGz ¶
func UpdateMalwareRulesInfo ¶
func UpdateSecretsRulesInfo ¶
func UploadToMinio ¶
Types ¶
type DBUploadRequest ¶
type DeepfenceRule ¶
type FeedsBundle ¶
type FeedsBundle struct { Version string `json:"version"` CreatedAt int64 `json:"created_at"` ScannerFeeds ScannerFeeds `json:"scanner_feeds"` TracerFeeds TracerFeeds `json:"tracer_feeds"` Extra []string `json:"extra"` }
func NewFeeds ¶
func NewFeeds(createdAt int64, version string) *FeedsBundle
func (*FeedsBundle) AddCloudComplianceRules ¶
func (fb *FeedsBundle) AddCloudComplianceRules(df []DeepfenceRule)
func (*FeedsBundle) AddComplianceRules ¶
func (fb *FeedsBundle) AddComplianceRules(df []DeepfenceRule)
func (*FeedsBundle) AddFilesystemRules ¶
func (fb *FeedsBundle) AddFilesystemRules(df []DeepfenceRule)
func (*FeedsBundle) AddMalwareRules ¶
func (fb *FeedsBundle) AddMalwareRules(df []DeepfenceRule)
func (*FeedsBundle) AddNetworkRules ¶
func (fb *FeedsBundle) AddNetworkRules(df ...DeepfenceRule)
func (*FeedsBundle) AddProcessRules ¶
func (fb *FeedsBundle) AddProcessRules(df []DeepfenceRule)
func (*FeedsBundle) AddSecretRules ¶
func (fb *FeedsBundle) AddSecretRules(df []DeepfenceRule)
func (*FeedsBundle) AddTracerArtefacts ¶
func (fb *FeedsBundle) AddTracerArtefacts(df []Artefact)
func (*FeedsBundle) AddVulnerabilityRules ¶
func (fb *FeedsBundle) AddVulnerabilityRules(df []DeepfenceRule)
func (*FeedsBundle) RemoveAllTypeNetworkRules ¶
func (fb *FeedsBundle) RemoveAllTypeNetworkRules(t string)
type ScannerFeeds ¶
type ScannerFeeds struct { VulnerabilityRules []DeepfenceRule `json:"vulnerability_rules"` SecretRules []DeepfenceRule `json:"secret_rules"` MalwareRules []DeepfenceRule `json:"malware_rules"` ComplianceRules []DeepfenceRule `json:"compliance_rules"` CloudComplianceRules []DeepfenceRule `json:"cloud_compliance_rules"` }
type TracerFeeds ¶
type TracerFeeds struct { NetworkRules []DeepfenceRule `json:"network_rules"` FilesystemRules []DeepfenceRule `json:"filesystem_rules"` ProcessRules []DeepfenceRule `json:"process_rules"` ExternalArtefacts []Artefact `json:"external_artefacts"` }
type VulnerabilityDBListing ¶
func LoadListing ¶
func LoadListing(d []byte) (*VulnerabilityDBListing, error)
func NewVulnerabilityDBListing ¶
func NewVulnerabilityDBListing() *VulnerabilityDBListing
func (*VulnerabilityDBListing) Append ¶
func (v *VulnerabilityDBListing) Append(db Database, version string)
func (*VulnerabilityDBListing) Bytes ¶
func (v *VulnerabilityDBListing) Bytes() ([]byte, error)
func (*VulnerabilityDBListing) Latest ¶
func (v *VulnerabilityDBListing) Latest(version string) *Database
func (*VulnerabilityDBListing) LatestN ¶
func (v *VulnerabilityDBListing) LatestN(version string, num int) (latest []Database, oldest []Database)
func (*VulnerabilityDBListing) Set ¶
func (v *VulnerabilityDBListing) Set(dbs []Database, version string)
func (*VulnerabilityDBListing) Sort ¶
func (v *VulnerabilityDBListing) Sort(version string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.