mitre

package
v0.0.0-...-70d0519 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package mitre provides functionality for working with MITRE ATT&CK data in Notion.

Index

Constants

View Source
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 (m *MITRE) CreateMalwarePage(ctx context.Context, client *notion.Client, db notion.Database, malware *stix2.Malware) (notion.Page, error)

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

func (m *MITRE) ListCampaigns() []*stix2.Campaign

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

func (m *MITRE) ListMalware() []*stix2.Malware

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

func WithLogger(logger *log.Logger) Option

WithLogger sets the logger for the MITRE struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL