Documentation ¶
Overview ¶
Package mitre provides functionality for working with MITRE ATT&CK data in Notion.
Index ¶
- Constants
- func NewRepository(data []byte, options ...Option) notionstix.Repository
- type MITRE
- func (m *MITRE) CreateAttackPatternPage(ctx context.Context, client *notion.Client, databaseID string, ...) (notion.Page, error)
- func (m *MITRE) CreateAttackPatternsDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
- func (m *MITRE) CreateCampaignPage(ctx context.Context, client *notion.Client, db notion.Database, ...) (notion.Page, error)
- func (m *MITRE) CreateCampaignsDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
- func (m *MITRE) CreateIntrusionSetPage(ctx context.Context, client *notion.Client, databaseID string, ...) (notion.Page, error)
- func (m *MITRE) CreateIntrusionSetsDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
- func (m *MITRE) CreateMalwareDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
- func (m *MITRE) CreateMalwarePage(ctx context.Context, client *notion.Client, db notion.Database, ...) (notion.Page, error)
- func (m *MITRE) ListAttackPatterns(collection *stix2.Collection) []*stix2.AttackPattern
- func (m *MITRE) ListCampaigns() []*stix2.Campaign
- func (m *MITRE) ListCollection() *stix2.Collection
- func (m *MITRE) ListIntrusionSets(collection *stix2.Collection) []*stix2.IntrusionSet
- func (m *MITRE) ListMalware() []*stix2.Malware
- type Option
Constants ¶
const (
STIX_JSON = "hack/enterprise-attack-14.1.json"
)
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
func NewRepository(data []byte, options ...Option) notionstix.Repository
NewRepository creates a new instance of the MITRE repository. It takes in a byte slice of STIX data and optional configuration options.
Types ¶
type MITRE ¶
type MITRE struct { Logger *log.Logger Collection *stix2.Collection }
MITRE represents the API for integrating the MITRE ATT&CK framework in Notion.
func (*MITRE) CreateAttackPatternPage ¶
func (m *MITRE) CreateAttackPatternPage(ctx context.Context, client *notion.Client, databaseID string, attackPattern *stix2.AttackPattern) (notion.Page, error)
CreateAttackPatternPage creates a new attack pattern page in the specified database.
func (*MITRE) CreateAttackPatternsDatabase ¶
func (m *MITRE) CreateAttackPatternsDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
CreateAttackPatternsDatabase creates a new attack patterns database in Notion.
func (*MITRE) CreateCampaignPage ¶
func (m *MITRE) CreateCampaignPage(ctx context.Context, client *notion.Client, db notion.Database, campaign *stix2.Campaign) (notion.Page, error)
CreateCampaignPage creates a campaign page in Notion.
func (*MITRE) CreateCampaignsDatabase ¶
func (m *MITRE) CreateCampaignsDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
CreateCampaignsDatabase creates a campaigns database in Notion.
func (*MITRE) CreateIntrusionSetPage ¶
func (m *MITRE) CreateIntrusionSetPage(ctx context.Context, client *notion.Client, databaseID string, IntrusionSet *stix2.IntrusionSet) (notion.Page, error)
CreateIntrusionSetPage creates a new IntrusionSet page in the specified IntrusionSets database.
func (*MITRE) CreateIntrusionSetsDatabase ¶
func (m *MITRE) CreateIntrusionSetsDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
CreateIntrusionSetsDatabase creates a new IntrusionSets database in Notion.
func (*MITRE) CreateMalwareDatabase ¶
func (m *MITRE) CreateMalwareDatabase(ctx context.Context, client *notion.Client, parentPageID string) (notion.Database, error)
CreateMalwareDatabase creates a malware database in Notion.
func (*MITRE) CreateMalwarePage ¶
func (*MITRE) ListAttackPatterns ¶
func (m *MITRE) ListAttackPatterns(collection *stix2.Collection) []*stix2.AttackPattern
ATTACK_PATTERN_PROPERTIES defines the properties of the attack pattern database. ListAttackPatterns returns all attack patterns in the collection.
func (*MITRE) ListCampaigns ¶
ListCampaigns returns all campaigns in the collection.
func (*MITRE) ListCollection ¶
func (m *MITRE) ListCollection() *stix2.Collection
func (*MITRE) ListIntrusionSets ¶
func (m *MITRE) ListIntrusionSets(collection *stix2.Collection) []*stix2.IntrusionSet
ListIntrusionSets returns all the IntrusionSets in the MITRE collection.
func (*MITRE) ListMalware ¶
MALWARE_PROPERTIES defines the properties of the malware database. var MALWARE_PROPERTIES = ListMalware returns all the malware objects in the collection.
type Option ¶
type Option func(*MITRE)
Option is a functional option for configuring the MITRE struct.
func WithCollection ¶
func WithCollection(collection *stix2.Collection) Option
WithCollection sets the STIX2 collection for the MITRE struct.
func WithLogger ¶
WithLogger sets the logger for the MITRE struct.