ctis

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 20 Imported by: 2

README

CTIS: CTEM Ingest Schema

CI

CTIS is the JSON format security tools use to send assets, findings and dependencies (SBOM) to a CTEM platform such as OpenCTEM. Product documentation: https://docs.openctem.io. This repository is the single source of truth for:

  • The specification: docs/spec.md, normative, with a field reference generated from the schema.
  • JSON Schemas (schemas/v1/): draft-07, language-agnostic.
  • Go types (root package): what OpenCTEM decodes reports into.
  • Severity (severity/) and fingerprint (fingerprint/) helpers.
  • Converters: SARIF and recon (subfinder, dnsx, naabu, httpx, katana) output to CTIS.
  • Examples (examples/): one report per finding type, validated in CI.
  • Web URLs (weburl/): parse, normalise, template and redact web URLs.
  • Capability taxonomy (capability/): the closed list of acts a scan tool performs and the contract of each (docs/capabilities.md).

The current specification version is 1.6. See CHANGELOG.md.

Installation (Go)

go get github.com/openctemio/ctis

The module has no dependencies outside the Go standard library.

import (
    "github.com/openctemio/ctis"
    "github.com/openctemio/ctis/fingerprint"
    "github.com/openctemio/ctis/severity"
)

// Produce
report := ctis.NewReport() // version 1.6, $schema set, timestamp now
report.Tool = &ctis.Tool{Name: "my-scanner", Version: "1.0.0", Capabilities: []string{"sast"}}
report.Assets = append(report.Assets, ctis.Asset{ID: "repo", Type: ctis.AssetTypeRepository, Value: "github.com/org/repo"})
report.Findings = append(report.Findings, ctis.Finding{
    Type:        ctis.FindingTypeVulnerability,
    Title:       "SQL injection",
    Severity:    ctis.Severity(severity.FromCVSS(8.8)),
    AssetRef:    "repo",
    RuleID:      "sqli",
    Location:    &ctis.FindingLocation{Path: "app/db.go", StartLine: 42, Snippet: snippet},
    Fingerprint: fingerprint.GenerateSASTStable("app/db.go", "sqli", "db.Find", snippet),
})
if err := report.Validate(); err != nil {
    log.Fatal(err)
}

// Consume: decode strictly, as OpenCTEM does, then validate.
dec := json.NewDecoder(r)
dec.DisallowUnknownFields()
var in ctis.Report
if err := dec.Decode(&in); err != nil { /* reject */ }
if err := in.Validate(); err != nil { /* reject */ }

// Convert SARIF (Semgrep, CodeQL, Trivy, ...)
report, err := ctis.FromSARIF(sarifBytes, nil)

Schemas

Schema Description
report.json Report envelope: version, metadata, tool, assets, findings, dependencies, endpoints
asset.json Assets (domains, IPs, hosts, repositories, cloud, Web3, ...)
finding.json Security findings, with their web location (web) and typed evidence (evidence_items)
dependency.json SBOM dependencies
endpoint.json Web endpoints: a method and a path on an origin, parameters by name only (1.6)
evidence-item.json Typed evidence of a finding: HTTP exchanges, text, command output, file excerpts, screenshots, with marked sensitive spans (1.6)
web3-asset.json Web3 asset details
web3-finding.json Web3 vulnerability details

Each schema's $id resolves:

https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/report.json
https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/asset.json
https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/finding.json
https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/dependency.json
https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/endpoint.json
https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/evidence-item.json
https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/web3-asset.json
https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/web3-finding.json

Replace main with a release tag (vX.Y.Z) for an immutable copy. Every object sets additionalProperties: false except the properties bags: put producer-specific data in properties.

Validating CTIS reports

report.json references the other schemas, so load all eight.

Python
pip install "jsonschema[format-nongpl]"
import glob, json
from jsonschema import Draft7Validator, FormatChecker
from referencing import Registry, Resource
from referencing.jsonschema import DRAFT7

schemas = [json.load(open(p)) for p in glob.glob("schemas/v1/*.json")]
registry = Registry().with_resources(
    (s["$id"], Resource.from_contents(s, default_specification=DRAFT7)) for s in schemas
)
report_schema = next(s for s in schemas if s["$id"].endswith("/report.json"))
validator = Draft7Validator(report_schema, registry=registry, format_checker=FormatChecker())

errors = list(validator.iter_errors(json.load(open("my-report.json"))))
for e in errors:
    print("/".join(map(str, e.path)), e.message)

scripts/validate_schemas.py does this for the examples in CI.

Node.js
npm install ajv ajv-formats
const Ajv = require('ajv');
const addFormats = require('ajv-formats');
const fs = require('fs');

const ajv = new Ajv({ allErrors: true });
addFormats(ajv);
for (const f of fs.readdirSync('schemas/v1')) {
  ajv.addSchema(JSON.parse(fs.readFileSync(`schemas/v1/${f}`, 'utf8')));
}
const validate = ajv.getSchema('https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/report.json');
if (!validate(myReport)) console.log(validate.errors);

Schema validation checks shape. Report.Validate() in Go also checks what a schema cannot: unique IDs, asset_ref resolution, the spec version and score ranges (spec section 3.3).

Importing other tools' exports

The importer package converts exported files to CTIS 1.6: Nessus, Qualys (with the KnowledgeBase), DefectDojo Generic JSON, CycloneDX, SPDX, osv-scanner, CSAF, OpenVEX, SARIF 2.1.0, the ZAP traditional report (JSON and XML), and the native JSON of trivy, grype, nuclei, semgrep, betterleaks, gitleaks and vuls. Detect names the format from the first bytes; Parse converts the file:

res, err := importer.Parse(ctx, file, importer.Options{})
// res.Report: the CTIS report; res.VEX: statements of a VEX document;
// res.Stats, res.Issues (with line numbers), res.Unmapped.

Each format has a mapping spec: every source field, the CTIS member that keeps it or why it is ignored on purpose (docs/importers, generated from the code). The tests fail when a fixture holds a field its spec does not list, or a spec maps a field no fixture holds. Inputs are treated as hostile: size, depth, element, text and record limits; no XML internal subsets, entities or external resources; UTF-8, US-ASCII or ISO-8859-1 only; OpenZip refuses traversal, links, nested archives and decompression bombs. Scan credentials and account names are never copied into a report.

Web URLs

The weburl package parses, normalises and templates web URLs, so a crawler, a scanner and the platform give one endpoint the same identity:

u, err := weburl.Parse("HTTPS://Shop.Example.COM:443/api/v1/orders/42/?token=x")
u.Origin()   // "https://shop.example.com"
u.Template() // "/api/v1/orders/{int}"
u.Params     // ["token"]: names only, never values
weburl.RedactURL("https://u:p@a.example/x?api_key=k#t") // "https://a.example/x?api_key="
weburl.PathHash("GET", u.Template())                      // the endpoint's dedup key

Parse refuses anything that is not a plain absolute http(s) URL: user info, control and bidi characters, malformed escapes, invalid ports, ambiguous numeric hosts and URLs over 2,048 bytes. A query value is never kept.

Capability taxonomy

The capability package is the closed, versioned list of acts a scan tool can perform (discover.subdomains@1, scan.ports@1, sast.code@1, ...). The capability, not the tool, carries the facts about the act: its phase and CTEM stage, its tier floor (how intrusive it is at minimum), its typed input and output ports with the CTIS asset types they carry, its standard params, the CTIS paths every report of it must carry, and its MITRE ATT&CK, D3FEND and CAPEC references. A tool only declares which capabilities it implements.

c, ok := capability.Lookup("scan.ports@1")
c.Accepts("ip_address")          // true: an input port carries it
c.MayEmit("asset:repository")    // false: no port carries it
violations, err := c.Check(report, capability.CheckOptions{})

Check reports outputs the capability may not emit and records that miss a required path; producers run it before upload and receivers again at ingest. The reference page docs/capabilities.md is generated from the data.

Mapping any JSON tool output

The importer/mapping package turns the JSON or JSON Lines output of any command-line tool into CTIS through a declarative mapping file (openctem.io/mapping/v1), so wrapping a tool needs no parser code:

m, err := mapping.Load(mappingJSON)
report, stats, err := m.Apply(ctx, stdout, mapping.Options{Tool: &ctis.Tool{Name: "example-portscan"}})

The language is closed: predicates (exists, equals, in, RE2 matches), source paths, constants, named templates and a fixed list of transforms. It has no expressions, code, file or network access. Targets are checked against the CTIS types. Ids, links between records and the report's tool cannot be set. Input is bounded in size, depth, line length and record count. See docs/mapping.md.

Asset types

Group Types
External attack surface domain, subdomain, ip_address, certificate
Applications website, web_application, api, mobile_app, service
Code repository
Cloud cloud_account, compute, storage, database, serverless, container_registry
Infrastructure host, server, container, kubernetes, kubernetes_cluster, kubernetes_namespace
Network network, vpc, subnet, load_balancer, firewall
Identity / IAM iam_user, iam_role, service_account
Recon results http_service, open_port, discovered_url
Web3 smart_contract, wallet, token, nft_collection, defi_protocol, blockchain
Other unclassified

Finding types

Type Description
vulnerability Code, dependency, host or web vulnerabilities
secret Exposed secrets and credentials
misconfiguration IaC, cloud and configuration issues
compliance Compliance control failures
web3 Smart contract vulnerabilities

Versioning

  • version in a report is the spec version, MAJOR.MINOR. Receivers accept any minor of their major.
  • Minor versions only add optional members or values. Receivers decode strictly, so a producer must not send members newer than the receiver's minor: upgrade receivers first, then producers.
  • Module v1.MINOR.x implements spec 1.MINOR.

Details: docs/spec.md, section 2.

Contributing

Every change to the format updates the schema, the Go types, the examples and the CHANGELOG together. go test ./... fails when the schema and the Go types disagree, when an example does not validate, or when the generated field reference in docs/spec.md is stale (refresh it with go test -run TestSpecFieldReference -update). The design record of the 1.4 to 1.6 additions, with the status of each proposal, is docs/proposals-1.4.md.

Security

Report vulnerabilities privately; see SECURITY.md.

License

Apache License 2.0. See LICENSE and NOTICE.

Documentation

Overview

Package ctis defines CTIS, the CTEM Ingest Schema: the JSON format security tools use to send assets, findings and dependencies to a CTEM platform such as OpenCTEM.

The Go types in this package, the JSON Schema in schemas/v1 and the field reference in docs/spec.md describe the same format; tests keep them equal. Receivers decode strictly into these types, so a member they do not know is an error.

Producing a report:

r := ctis.NewReport() // stamps SchemaVersion, SchemaURL and the time
r.Tool = &ctis.Tool{Name: "my-scanner"}
r.Findings = append(r.Findings, ctis.Finding{
	Type: ctis.FindingTypeVulnerability, Title: "...", Severity: ctis.SeverityHigh,
})
if err := r.Validate(); err != nil { ... }

Converting tool output: FromSARIF for SARIF 2.1.0 logs, ConvertReconToCTIS and MergeReconReports for reconnaissance results.

Versioning: a report's Version is the specification version MAJOR.MINOR. Receivers accept every minor of their major (IsCompatibleVersion); because they decode strictly, producers must not send members newer than the receiver's minor. See docs/spec.md.

Index

Constants

View Source
const (
	MaxCapabilityRefLen    = 128
	MaxTechnologies        = 100
	MaxTechnologyNameLen   = 128
	MaxTechnologyVerLen    = 64
	MaxTechnologyCPELen    = 255
	MaxTechnologyCategory  = 10
	MaxTechnologyCatLen    = 64
	MaxFindingTechniques   = 20
	MaxRelationships       = 10000
	MaxRelationshipRefLen  = 255
	MaxFindingEvidenceSize = 64 * 1024
)

Limits of the 1.5 members. The schema states them too; Validate refuses a report that exceeds them.

View Source
const (
	EvidenceKindHTTPExchange  = "http_exchange"
	EvidenceKindRawText       = "raw_text"
	EvidenceKindScreenshot    = "screenshot"
	EvidenceKindFileExcerpt   = "file_excerpt"
	EvidenceKindCommandOutput = "command_output"
	EvidenceKindCurl          = "curl"
)

Evidence kinds this module knows.

View Source
const (
	MaxEvidenceItems       = 20
	MaxEvidenceItemBytes   = 256 << 10
	MaxEvidenceBodyBytes   = 64 << 10
	MaxEvidenceTextBytes   = 64 << 10
	MaxEvidenceHeaders     = 100
	MaxEvidenceHeaderBytes = 8 << 10
	MaxEvidenceExtracted   = 20
	MaxEvidenceExtractLen  = 1 << 10
	MaxEvidenceLabelLen    = 200
	MaxEvidenceMatches     = 50
	MaxEvidenceSpans       = 200
	MaxEvidenceURLBytes    = 8 << 10
	MaxEvidenceCommandLen  = 8 << 10
	MaxEvidenceDataBytes   = 64 << 10
)

Limits of evidence.

View Source
const (
	BodyEncodingText   = "text"
	BodyEncodingBase64 = "base64"
)

Body encodings.

View Source
const (
	MatchLocationRequest  = "request"
	MatchLocationResponse = "response"
	MatchPartStatus       = "status"
	MatchPartHeader       = "header"
	MatchPartBody         = "body"
	MatchPartURL          = "url"
)

Match locations and parts.

View Source
const (
	MaxScores              = 32
	MaxScoreVectorLen      = 512
	MaxScoreSourceLen      = 64
	MaxScoreLabelLen       = 32
	MaxVulnerabilityIDs    = 64
	MaxVulnerabilityIDLen  = 128
	MaxAdvisories          = 50
	MaxAdvisoryURLLen      = 2048
	MaxNativeValueLen      = 64  // native severity, status, justification
	MaxNativeIDLen         = 256 // native vuln id, instance id, family
	MaxRawRefLen           = 1024
	MaxVEXStatementLen     = 4096
	MaxVEXSourceLen        = 512
	MaxSourceExtraEntries  = 64
	MaxSourceExtraKeyLen   = 128
	MaxSourceExtraValueLen = 4096
	MaxSourceExtraBytes    = 32 * 1024 // keys plus values, in bytes
	MaxIdentityHintLen     = 255
	MaxIdentityHintMACs    = 32
	MaxTimesFound          = 1_000_000_000
)

Size limits of the interoperability members. They are part of the contract (the schema states them and Validate enforces them), so a hostile or broken producer cannot make a receiver store unbounded data through them.

View Source
const (
	SchemaVersion = "1.6"
	SchemaMajor   = 1

	// SchemaBaseURL is the base of the published schema $ids. Every file in
	// schemas/v1 is reachable at SchemaBaseURL + its file name.
	SchemaBaseURL = "https://raw.githubusercontent.com/openctemio/ctis/main/schemas/v1/"

	// SchemaURL is the $id of the report schema, for Report.Schema.
	SchemaURL = SchemaBaseURL + "report.json"
)

Specification version and schema location.

SchemaVersion is the MAJOR.MINOR of the CTIS specification this module implements, and the value producers put in Report.Version. It moves with the module's minor version: module v1.3.x implements CTIS 1.3. A parity test keeps it equal to the "default" of report.json#/properties/version.

Compatibility rule (docs/spec.md, "Versioning"):

  • A consumer accepts every report whose major equals SchemaMajor.
  • A minor release only adds optional fields or enum values.
  • A consumer that decodes strictly (unknown fields rejected) still refuses a field newer than its own minor, so a producer must not send fields from a minor newer than the consumer it talks to. Upgrade receivers first.
View Source
const (
	MaxEndpoints        = 200000
	MaxEndpointParams   = 100
	MaxParamNameLen     = 128
	MaxEndpointPathLen  = 2048
	MaxContentTypeLen   = 255
	MaxParamTypeHintLen = 32
	MaxEndpointIDLen    = 128
	MaxWebRequestRefLen = 128
)

Limits of the web members.

Variables

This section is empty.

Functions

func CVSSVersionOfVector added in v1.6.0

func CVSSVersionOfVector(vector string) string

CVSSVersionOfVector returns the CVSS version a vector string declares ("3.0", "3.1", "4.0"), "2.0" for a prefix-less v2 vector (AV:N/AC:L/...), or "" when it is not a CVSS vector.

func ContainsSecret added in v1.6.0

func ContainsSecret(s string, raw ...string) bool

ContainsSecret reports whether s holds one of the raw values, the check a test or a receiver uses to prove a value never reached storage.

func FitEvidenceItem added in v1.6.0

func FitEvidenceItem(it *EvidenceItem)

FitEvidenceItem shrinks an http_exchange item until it serializes under MaxEvidenceItemBytes (JSON escaping can make a body up to six times longer), halving the larger body first and marking it truncated.

func IsAttackTechniqueID added in v1.6.0

func IsAttackTechniqueID(s string) bool

IsAttackTechniqueID reports whether s is a well-formed MITRE ATT&CK technique id ("T1190") or sub-technique id ("T1595.002").

func IsCapabilityRef added in v1.6.0

func IsCapabilityRef(s string) bool

IsCapabilityRef reports whether s has the form of a capability reference ("scan.ports@1"). It does not say whether the capability exists; the capability package does.

func IsCompatibleVersion added in v1.6.0

func IsCompatibleVersion(v string) bool

IsCompatibleVersion reports whether a report declaring version v can be read by this module: same major, any minor. See the package compatibility rule on SchemaVersion for what a newer minor implies.

func IsKnownEvidenceKind added in v1.6.0

func IsKnownEvidenceKind(kind string) bool

IsKnownEvidenceKind reports whether this module validates the kind's body.

func IsSensitiveHeader added in v1.6.0

func IsSensitiveHeader(name string) bool

IsSensitiveHeader reports whether a header carries credentials or a session: Authorization, Proxy-Authorization, Cookie, Set-Cookie, X-Api-Key, or a name with token, secret, session or auth in it.

func IsSensitiveParam added in v1.6.0

func IsSensitiveParam(name string) bool

IsSensitiveParam reports whether a query, form or JSON member name names a credential, a session or a token.

func IsSupportedVersion added in v1.6.0

func IsSupportedVersion(v string) bool

IsSupportedVersion reports whether v is one of SupportedSchemaVersions.

func KnownEvidenceKinds added in v1.6.0

func KnownEvidenceKinds() []string

KnownEvidenceKinds returns the kinds whose body this module validates.

func LocationKey added in v1.6.0

func LocationKey(f *Finding) string

LocationKey returns the normalized location of a finding on its asset, the location part of a cross-source deduplication key (asset, vulnerability, location). The asset is not part of it. In order of precedence:

  • "pkg:<type>/<namespace>/<name>": the package URL without version, qualifiers or subpath; else "pkg:<ecosystem>/<package>" by name;
  • "url:<scheme>://<host>[:port]/<path>": a web location, lower-case scheme and host, default port, user info, query and fragment removed;
  • "file:<path>": a repository-relative POSIX path (line numbers are not part of it: they move when unrelated code changes);
  • "net:<port>/<protocol>" or "net:host" for a host-level network finding;
  • "resource:<type>/<name>" for a misconfigured resource;
  • "" when the finding names no location.

It is derived, never sent: a receiver computes it so a producer cannot choose the key another producer's finding is merged under.

func MarkSensitive added in v1.6.0

func MarkSensitive(items ...*EvidenceItem)

MarkSensitive adds sensitive spans to the items for the values of sensitive headers, of sensitive query, form and JSON members of request URLs and bodies, and for every other place in the items that repeats one of those values (a curl command repeating the Cookie header). Values are marked, never masked; spans already present are kept.

func MaskSecretMatch added in v1.6.0

func MaskSecretMatch(s string) string

MaskSecretMatch masks a secret scanner's raw match the way FromSARIF does: the first 4 characters of a secret of 16 characters or more followed by asterisks, else "REDACTED". The masked form does not reveal the length. Converters of other secret-scanner formats use it so every report masks a match the same way.

func NormalizeAssetName

func NormalizeAssetName(assetType AssetType, name string) string

NormalizeAssetName normalizes an asset name for the given type. This is a lightweight implementation for defense-in-depth. The API server re-normalizes authoritatively before storage.

Part of RFC-001: Asset Identity Resolution.

func NormalizeNativeStatus added in v1.6.0

func NormalizeNativeStatus(scheme NativeScheme, native string) (status FindingStatus, state SourceState, ok bool)

NormalizeNativeStatus maps a native status of the given scheme to a CTIS finding status and a source state. state is empty when the native value is a disposition rather than a lifecycle state. Unknown schemes and values return ok=false.

A receiver that keeps its own lifecycle should treat status as the source's claim: "resolved" means the source no longer sees it, not that it is fixed.

func ParseVersion added in v1.6.0

func ParseVersion(v string) (major, minor int, ok bool)

ParseVersion splits a CTIS version of the form MAJOR.MINOR. It accepts only non-negative decimal numbers without leading zeros, so "1.3" parses and "1", "v1.3", "1.03" and "1.3.0" do not.

func RedactSecretFinding added in v1.6.0

func RedactSecretFinding(f *Finding, known ...string)

RedactSecretFinding masks raw secret values everywhere in f: the title, description, message, snippet, evidence, remediation, fingerprints, tags, properties and every other plain string field.

The values masked are the known raw values passed in and, for a secret finding (type secret), the location snippet and secret.masked_value when they are not already masked. A value is masked as a whole, and so is each secret-looking word in it: a snippet holding a whole code line (key = "AKIA...") still has the bare secret masked where the title repeats it alone. Values already masked (asterisks, REDACTED) are left as they are, so the call is idempotent and a producer's masking is kept.

Receivers call it on every finding they store, as defence in depth; the converters of this module call it on every secret finding they emit.

func SetSourceExtra added in v1.6.0

func SetSourceExtra(f *Finding, key, value string) bool

SetSourceExtra stores one unmapped source field on f within the source_extra limits. The key is trimmed; a value longer than MaxSourceExtraValueLen characters is cut at that length. It returns false and stores nothing when the key is empty, too long or holds control characters, or when the entry would exceed MaxSourceExtraEntries or MaxSourceExtraBytes. Replacing an existing key is allowed within the limits.

func SupportedSchemaVersions added in v1.6.0

func SupportedSchemaVersions() []string

SupportedSchemaVersions returns every CTIS version this module reads with full knowledge of its members, oldest first: 1.0 up to SchemaVersion. A report declaring any of them decodes strictly into the Go types and passes Validate. Code that compared a version against a literal such as "1.3" should check membership here instead (or IsCompatibleVersion, which also accepts newer minors of the same major).

Types

type ASNInput added in v1.6.0

type ASNInput struct {
	Number  string // "AS13335" or "13335"
	Org     string
	Country string // ISO 3166-1 alpha-2
}

ASNInput is an autonomous system.

type ASVSInfo

type ASVSInfo struct {
	// ASVS section (e.g., "V2: Authentication")
	Section string `json:"section,omitempty"`

	// Control ID (e.g., "2.1.1")
	ControlID string `json:"control_id,omitempty"`

	// Control URL (link to ASVS documentation)
	ControlURL string `json:"control_url,omitempty"`

	// ASVS level (1, 2, or 3)
	Level int `json:"level,omitempty"`
}

ASVSInfo contains OWASP ASVS (Application Security Verification Standard) compliance info. ASVS provides a basis for testing application security controls.

type AccessControlIssue

type AccessControlIssue struct {
	// Missing modifier
	MissingModifier string `json:"missing_modifier,omitempty"`

	// Unprotected function
	UnprotectedFunction string `json:"unprotected_function,omitempty"`

	// Can be called by
	CallableBy string `json:"callable_by,omitempty"` // anyone, owner_only, etc.

	// Privilege escalation path
	EscalationPath string `json:"escalation_path,omitempty"`

	// Missing role check
	MissingRoleCheck string `json:"missing_role_check,omitempty"`
}

AccessControlIssue contains details about access control vulnerabilities.

type Advisory added in v1.6.0

type Advisory struct {
	// Advisory id (MS24-001, RHSA-2024:1234, DSA-5600-1).
	ID string `json:"id,omitempty"`

	// Advisory URL.
	URL string `json:"url,omitempty"`

	// Issuer (microsoft, redhat, debian, ...).
	Source string `json:"source,omitempty"`
}

Advisory is a vendor advisory that addresses a finding.

type ArtifactLocation

type ArtifactLocation struct {
	// URI of the artifact
	URI string `json:"uri,omitempty"`

	// Base URI ID for resolution
	URIBaseID string `json:"uri_base_id,omitempty"`

	// Index within the artifacts array
	Index int `json:"index,omitempty"`
}

ArtifactLocation represents the location of an artifact.

type Asset

type Asset struct {
	// Unique identifier for this asset within the report
	ID string `json:"id,omitempty"`

	// Asset type (required): domain, ip_address, repository, certificate, etc.
	Type AssetType `json:"type"`

	// Primary value of the asset (required)
	// For domain: "example.com"
	// For ip_address: "192.168.1.1"
	// For repository: "github.com/org/repo"
	Value string `json:"value"`

	// Human-readable name
	Name string `json:"name,omitempty"`

	// Description
	Description string `json:"description,omitempty"`

	// Tags for categorization
	Tags []string `json:"tags,omitempty"`

	// Asset criticality: critical, high, medium, low, info
	Criticality Criticality `json:"criticality,omitempty"`

	// Confidence score 0-100 (how confident the source is about this asset)
	Confidence int `json:"confidence,omitempty"`

	// When this asset was discovered
	DiscoveredAt *time.Time `json:"discovered_at,omitempty"`

	// Asset-specific technical details
	Technical *AssetTechnical `json:"technical,omitempty"`

	// Related assets (by ID within this report)
	RelatedAssets []string `json:"related_assets,omitempty"`

	// CTEM: Compliance context for the asset
	Compliance *AssetCompliance `json:"compliance,omitempty"`

	// CTEM: Services running on this asset
	Services []ServiceInfo `json:"services,omitempty"`

	// CTEM: Is the asset directly accessible from the internet
	IsInternetAccessible bool `json:"is_internet_accessible,omitempty"`

	// Stable identifiers of the asset. A platform matches an incoming asset
	// to an existing one on these before it falls back to the name or an IP
	// address, so a renamed host or repository keeps its history.
	Identifiers *AssetIdentifiers `json:"identifiers,omitempty"`

	// What a scanner observed about the host that helps match it across
	// tools (FQDN, NetBIOS name, MACs, OS CPE, cloud id, agent id). Weaker
	// than Identifiers.
	IdentityHints *IdentityHints `json:"identity_hints,omitempty"`

	// Technologies the asset runs, as a fingerprinting tool identified
	// them (1.5). Replaces the untyped properties.technologies list.
	Technologies []Technology `json:"technologies,omitempty"`

	// Custom properties
	Properties Properties `json:"properties,omitempty"`
}

Asset represents a discovered asset.

type AssetCompliance

type AssetCompliance struct {
	// Compliance frameworks this asset is in scope for: PCI-DSS, HIPAA, SOC2, GDPR, ISO27001
	Frameworks []string `json:"frameworks,omitempty"`

	// Data classification level: public, internal, confidential, restricted, secret
	DataClassification string `json:"data_classification,omitempty"`

	// Asset contains Personally Identifiable Information
	PIIExposed bool `json:"pii_exposed,omitempty"`

	// Asset contains Protected Health Information
	PHIExposed bool `json:"phi_exposed,omitempty"`

	// Regulatory owner email/username
	RegulatoryOwner string `json:"regulatory_owner,omitempty"`
}

AssetCompliance contains CTEM compliance context for an asset.

type AssetIdentifiers added in v1.2.0

type AssetIdentifiers struct {
	// Host ID read by a sensor on the host: /etc/machine-id on Linux,
	// MachineGuid on Windows, IOPlatformUUID on macOS.
	MachineID string `json:"machine_id,omitempty"`

	// Cloud instance ID (i-0abc...), VM ID or resource ARN.
	CloudResourceID string `json:"cloud_resource_id,omitempty"`

	// SMBIOS system UUID.
	BIOSUUID string `json:"bios_uuid,omitempty"`

	// Hardware serial number.
	SerialNumber string `json:"serial_number,omitempty"`

	// MAC addresses of the host's network interfaces. Receivers ignore
	// locally administered, multicast and known shared addresses.
	MACAddresses []string `json:"mac_addresses,omitempty"`

	// Repository ID assigned by the source-code host (the numeric GitHub
	// repository ID, the GitLab project ID). It survives renames and
	// transfers.
	SCMRepoID string `json:"scm_repo_id,omitempty"`
}

AssetIdentifiers holds identifiers that stay the same when an asset is renamed or readdressed. Send only values read from the asset itself; leave a field empty rather than guessing. In order of trust:

  1. MachineID, the operating system's own host ID
  2. CloudResourceID
  3. BIOSUUID, then SerialNumber
  4. MACAddresses

SCMRepoID identifies a repository.

type AssetTechnical

type AssetTechnical struct {
	// For domain assets
	Domain *DomainTechnical `json:"domain,omitempty"`

	// For IP address assets
	IPAddress *IPAddressTechnical `json:"ip_address,omitempty"`

	// For repository assets
	Repository *RepositoryTechnical `json:"repository,omitempty"`

	// For certificate assets
	Certificate *CertificateTechnical `json:"certificate,omitempty"`

	// For cloud assets
	Cloud *CloudTechnical `json:"cloud,omitempty"`

	// For service assets
	Service *ServiceTechnical `json:"service,omitempty"`

	// For Web3 assets (smart contracts, wallets, tokens, etc.)
	Web3 *Web3Technical `json:"web3,omitempty"`
}

AssetTechnical contains type-specific technical details.

type AssetType

type AssetType string

AssetType represents the type of an asset.

const (
	// ==========================================================================
	// Discovery / External Attack Surface
	// ==========================================================================
	AssetTypeDomain      AssetType = "domain"
	AssetTypeSubdomain   AssetType = "subdomain"
	AssetTypeIPAddress   AssetType = "ip_address"
	AssetTypeCertificate AssetType = "certificate"

	// ==========================================================================
	// Applications
	// ==========================================================================
	AssetTypeWebsite        AssetType = "website"         // Public-facing website
	AssetTypeWebApplication AssetType = "web_application" // Web application (SaaS, internal apps)
	AssetTypeAPI            AssetType = "api"             // API endpoint (REST, GraphQL, gRPC)
	AssetTypeMobileApp      AssetType = "mobile_app"      // Mobile application (iOS, Android)
	AssetTypeService        AssetType = "service"         // Network service (SSH, SMTP, FTP, DNS, etc.)

	// ==========================================================================
	// Code / Repository
	// ==========================================================================
	AssetTypeRepository AssetType = "repository"

	// ==========================================================================
	// Cloud
	// ==========================================================================
	AssetTypeCloudAccount      AssetType = "cloud_account"      // AWS Account, GCP Project, Azure Subscription
	AssetTypeCompute           AssetType = "compute"            // EC2, GCE, Azure VM
	AssetTypeStorage           AssetType = "storage"            // S3, GCS, Azure Blob
	AssetTypeDatabase          AssetType = "database"           // RDS, Cloud SQL, Cosmos DB
	AssetTypeServerless        AssetType = "serverless"         // Lambda, Cloud Functions, Azure Functions
	AssetTypeContainerRegistry AssetType = "container_registry" // ECR, GCR, ACR

	// ==========================================================================
	// Infrastructure
	// ==========================================================================
	AssetTypeHost                AssetType = "host"                 // Physical or virtual host
	AssetTypeServer              AssetType = "server"               // Server machine
	AssetTypeContainer           AssetType = "container"            // Docker container
	AssetTypeKubernetes          AssetType = "kubernetes"           // Kubernetes cluster (generic)
	AssetTypeKubernetesCluster   AssetType = "kubernetes_cluster"   // Kubernetes cluster
	AssetTypeKubernetesNamespace AssetType = "kubernetes_namespace" // Kubernetes namespace

	// ==========================================================================
	// Network
	// ==========================================================================
	AssetTypeNetwork      AssetType = "network"       // Network segment
	AssetTypeVPC          AssetType = "vpc"           // Virtual Private Cloud
	AssetTypeSubnet       AssetType = "subnet"        // Network subnet
	AssetTypeLoadBalancer AssetType = "load_balancer" // Load balancer (ALB, NLB, etc.)
	AssetTypeFirewall     AssetType = "firewall"      // Firewall / Security Group

	// ==========================================================================
	// Identity / IAM
	// ==========================================================================
	AssetTypeIAMUser        AssetType = "iam_user"        // IAM user
	AssetTypeIAMRole        AssetType = "iam_role"        // IAM role
	AssetTypeServiceAccount AssetType = "service_account" // Service account

	// ==========================================================================
	// Recon-discovered Asset Types
	// ==========================================================================
	AssetTypeHTTPService   AssetType = "http_service"   // HTTP/HTTPS services from HTTPX
	AssetTypeOpenPort      AssetType = "open_port"      // Individual open ports from Naabu
	AssetTypeDiscoveredURL AssetType = "discovered_url" // URLs/endpoints from Katana

	// ==========================================================================
	// Web3 Asset Types
	// ==========================================================================
	AssetTypeSmartContract AssetType = "smart_contract"
	AssetTypeWallet        AssetType = "wallet"
	AssetTypeNFTCollection AssetType = "nft_collection"
	AssetTypeDeFiProtocol  AssetType = "defi_protocol"
	AssetTypeToken         AssetType = "token"
	AssetTypeBlockchain    AssetType = "blockchain"

	// ==========================================================================
	// Unclassified Assets
	// ==========================================================================
	AssetTypeUnclassified AssetType = "unclassified" // Assets that have not been classified yet
)

func AllAssetTypes

func AllAssetTypes() []AssetType

AllAssetTypes returns all valid asset types.

func (AssetType) IsValid

func (t AssetType) IsValid() bool

IsValid checks if the asset type is valid.

func (AssetType) String

func (t AssetType) String() string

String returns the string representation.

type Attachment

type Attachment struct {
	// Description of the attachment
	Description string `json:"description,omitempty"`

	// Artifact location
	ArtifactLocation *ArtifactLocation `json:"artifact_location,omitempty"`

	// Relevant regions within the artifact
	Regions []*FindingLocation `json:"regions,omitempty"`
}

Attachment represents an artifact or evidence attachment (SARIF attachment).

type AuditReport

type AuditReport struct {
	Auditor       string     `json:"auditor"`
	ReportURL     string     `json:"report_url,omitempty"`
	Date          *time.Time `json:"date,omitempty"`
	Scope         string     `json:"scope,omitempty"`
	CriticalCount int        `json:"critical_count,omitempty"`
	HighCount     int        `json:"high_count,omitempty"`
	MediumCount   int        `json:"medium_count,omitempty"`
	LowCount      int        `json:"low_count,omitempty"`
}

AuditReport represents a security audit report.

type BranchInfo

type BranchInfo struct {
	// Branch name (e.g., "main", "feature/xyz", "refs/heads/main")
	Name string `json:"name"`

	// Whether this is the default branch (main/master)
	// Auto-resolve only applies to default branch scans
	IsDefaultBranch bool `json:"is_default_branch"`

	// Commit SHA being scanned
	CommitSHA string `json:"commit_sha,omitempty"`

	// Base branch for PR/MR scans (e.g., "main" when scanning a PR targeting main)
	BaseBranch string `json:"base_branch,omitempty"`

	// PR/MR number if this is a pull request scan
	PullRequestNumber int `json:"pull_request_number,omitempty"`

	// PR/MR URL if this is a pull request scan
	PullRequestURL string `json:"pull_request_url,omitempty"`

	// Repository URL for context
	RepositoryURL string `json:"repository_url,omitempty"`
}

BranchInfo contains git branch context for CI/CD scans. Used for branch-aware finding lifecycle management (auto-resolve, expiry).

type BusinessImpact

type BusinessImpact struct {
	// Data exposure risk: none, low, medium, high, critical
	DataExposureRisk string `json:"data_exposure_risk,omitempty"`

	// Has potential reputational impact
	ReputationalImpact bool `json:"reputational_impact,omitempty"`

	// Compliance frameworks impacted: PCI-DSS, HIPAA, SOC2, GDPR, ISO27001
	ComplianceImpact []string `json:"compliance_impact,omitempty"`
}

BusinessImpact contains CTEM business impact assessment for a finding.

type CertificateTechnical

type CertificateTechnical struct {
	// Serial number
	SerialNumber string `json:"serial_number,omitempty"`

	// Subject common name
	SubjectCN string `json:"subject_cn,omitempty"`

	// Subject alternative names
	SANs []string `json:"sans,omitempty"`

	// Issuer common name
	IssuerCN string `json:"issuer_cn,omitempty"`

	// Issuer organization
	IssuerOrg string `json:"issuer_org,omitempty"`

	// Valid from
	NotBefore *time.Time `json:"not_before,omitempty"`

	// Valid until
	NotAfter *time.Time `json:"not_after,omitempty"`

	// Signature algorithm
	SignatureAlgorithm string `json:"signature_algorithm,omitempty"`

	// Key algorithm
	KeyAlgorithm string `json:"key_algorithm,omitempty"`

	// Key size in bits
	KeySize int `json:"key_size,omitempty"`

	// SHA-256 fingerprint
	Fingerprint string `json:"fingerprint,omitempty"`

	// Is self-signed
	SelfSigned bool `json:"self_signed,omitempty"`

	// Is expired
	Expired bool `json:"expired,omitempty"`

	// Is wildcard
	Wildcard bool `json:"wildcard,omitempty"`
}

CertificateTechnical contains certificate-specific technical details.

type CloudTechnical

type CloudTechnical struct {
	// Cloud provider: aws, gcp, azure
	Provider string `json:"provider,omitempty"`

	// Account/project ID
	AccountID string `json:"account_id,omitempty"`

	// Region
	Region string `json:"region,omitempty"`

	// Availability zone
	Zone string `json:"zone,omitempty"`

	// Resource type: ec2, s3, rds, etc.
	ResourceType string `json:"resource_type,omitempty"`

	// Resource ID
	ResourceID string `json:"resource_id,omitempty"`

	// Resource ARN (AWS)
	ARN string `json:"arn,omitempty"`

	// Resource tags
	Tags map[string]string `json:"tags,omitempty"`
}

CloudTechnical contains cloud resource-specific technical details.

type ComplianceDetails

type ComplianceDetails struct {
	// Framework: pci-dss, hipaa, soc2, cis, etc.
	Framework string `json:"framework,omitempty"`

	// Framework version
	FrameworkVersion string `json:"framework_version,omitempty"`

	// Control ID
	ControlID string `json:"control_id,omitempty"`

	// Control name
	ControlName string `json:"control_name,omitempty"`

	// Control description
	ControlDescription string `json:"control_description,omitempty"`

	// Result: pass, fail, manual, not_applicable
	Result string `json:"result,omitempty"`
}

ComplianceDetails contains compliance-specific details.

type ContainerLayer

type ContainerLayer struct {
	// Layer digest (e.g., "sha256:abc123...")
	Digest string `json:"digest,omitempty"`

	// Layer diff ID
	DiffID string `json:"diff_id,omitempty"`
}

ContainerLayer contains information about the container layer where a vulnerability was found.

type ContractLibrary

type ContractLibrary struct {
	Name    string `json:"name"`
	Address string `json:"address"`
}

ContractLibrary represents an external library linked to a contract.

type ConvertOptions

type ConvertOptions struct {
	// Asset to associate findings with
	AssetType  AssetType
	AssetValue string
	AssetID    string

	// Branch/commit info (legacy - use BranchInfo for full context)
	Branch    string
	CommitSHA string

	// Branch information for branch-aware finding lifecycle
	// Provides full CI/CD context for auto-resolve and expiry features
	BranchInfo *BranchInfo

	// Default confidence
	DefaultConfidence int

	// Tool type hints (for finding type detection)
	ToolType string // "sast", "sca", "secret", "iac", "web3"
}

ConvertOptions configures SARIF to CTIS conversion.

func DefaultConvertOptions

func DefaultConvertOptions() *ConvertOptions

DefaultConvertOptions returns default conversion options.

type CoreContract

type CoreContract struct {
	Name    string `json:"name"`
	Address string `json:"address"`
	Role    string `json:"role,omitempty"` // router, factory, vault, etc.
}

CoreContract represents a core contract of a DeFi protocol.

type Criticality

type Criticality string

Criticality represents asset criticality level.

const (
	CriticalityCritical Criticality = "critical"
	CriticalityHigh     Criticality = "high"
	CriticalityMedium   Criticality = "medium"
	CriticalityLow      Criticality = "low"
	CriticalityInfo     Criticality = "info"
)

func AllCriticalities

func AllCriticalities() []Criticality

AllCriticalities returns all valid criticalities.

func (Criticality) IsValid

func (c Criticality) IsValid() bool

IsValid checks if the criticality is valid.

func (Criticality) String

func (c Criticality) String() string

String returns the string representation.

type DNSRecord

type DNSRecord struct {
	Type  string `json:"type"`  // A, AAAA, CNAME, MX, TXT, etc.
	Name  string `json:"name"`  // Record name
	Value string `json:"value"` // Record value
	TTL   int    `json:"ttl,omitempty"`
}

DNSRecord represents a DNS record.

type DNSRecordInput

type DNSRecordInput struct {
	Host       string
	RecordType string
	Values     []string
	TTL        int
	Resolver   string
	StatusCode string
}

DNSRecordInput represents a DNS record.

type DataFlow

type DataFlow struct {
	// Taint source locations (where untrusted data enters)
	Sources []DataFlowLocation `json:"sources,omitempty"`

	// Intermediate variable locations (propagation path)
	Intermediates []DataFlowLocation `json:"intermediates,omitempty"`

	// Taint sink location (where data reaches dangerous function)
	Sinks []DataFlowLocation `json:"sinks,omitempty"`

	// Sanitizers applied (functions that clean/escape data)
	Sanitizers []DataFlowLocation `json:"sanitizers,omitempty"`

	// Whether the data is still tainted at the sink
	// (false if properly sanitized before reaching sink)
	Tainted bool `json:"tainted"`

	// Type of taint: user_input, file_read, env_var, network, database
	TaintType string `json:"taint_type,omitempty"`

	// Vulnerability type this flow leads to: sqli, xss, ssrf, command_injection, etc.
	VulnerabilityType string `json:"vulnerability_type,omitempty"`

	// Flow confidence score (0-100)
	Confidence int `json:"confidence,omitempty"`

	// Is interprocedural (crosses function boundaries)
	Interprocedural bool `json:"interprocedural,omitempty"`

	// Is cross-file (data flows across multiple files)
	CrossFile bool `json:"cross_file,omitempty"`

	// Call graph path (function names in order)
	CallPath []string `json:"call_path,omitempty"`

	// Summary of the flow for human readability
	Summary string `json:"summary,omitempty"`
}

DataFlow represents taint analysis data flow trace. This structure captures the complete path from source to sink, including all intermediate steps and transformations.

func NewDataFlow

func NewDataFlow(source, sink DataFlowLocation) *DataFlow

NewDataFlow creates a new DataFlow with the given source and sink.

func (*DataFlow) AddIntermediate

func (df *DataFlow) AddIntermediate(loc DataFlowLocation)

AddIntermediate adds an intermediate step to the dataflow path.

func (*DataFlow) AddSanitizer

func (df *DataFlow) AddSanitizer(loc DataFlowLocation)

AddSanitizer adds a sanitizer location that cleans the tainted data.

func (*DataFlow) BuildSummary

func (df *DataFlow) BuildSummary() string

BuildSummary generates a human-readable summary of the dataflow.

func (*DataFlow) GetFullPath

func (df *DataFlow) GetFullPath() []DataFlowLocation

GetFullPath returns all locations in order from source to sink.

func (*DataFlow) GetPathLength

func (df *DataFlow) GetPathLength() int

GetPathLength returns the number of steps in the dataflow.

func (*DataFlow) IsCrossFunction

func (df *DataFlow) IsCrossFunction() bool

IsCrossFunction checks if the dataflow crosses function boundaries.

func (*DataFlow) MarkAsSanitized

func (df *DataFlow) MarkAsSanitized()

MarkAsSanitized marks the dataflow as no longer tainted.

type DataFlowLocation

type DataFlowLocation struct {
	// File path
	Path string `json:"path,omitempty"`

	// Line number (1-indexed)
	Line int `json:"line,omitempty"`

	// End line (for multi-line spans)
	EndLine int `json:"end_line,omitempty"`

	// Column number (1-indexed)
	Column int `json:"column,omitempty"`

	// End column
	EndColumn int `json:"end_column,omitempty"`

	// Code content at this location
	Content string `json:"content,omitempty"`

	// Variable or expression name
	Label string `json:"label,omitempty"`

	// Step index in the flow (for ordering, 0-indexed)
	Index int `json:"index,omitempty"`

	// Location type: source, sink, propagator, sanitizer, transform
	Type DataFlowLocationType `json:"type,omitempty"`

	// Function/method name containing this location
	Function string `json:"function,omitempty"`

	// Class/struct name (if applicable)
	Class string `json:"class,omitempty"`

	// Module/namespace
	Module string `json:"module,omitempty"`

	// The operation performed: assignment, call, return, parameter, concat, etc.
	Operation string `json:"operation,omitempty"`

	// For function calls: the function being called
	CalledFunction string `json:"called_function,omitempty"`

	// For parameters: the parameter index (0-indexed)
	ParameterIndex int `json:"parameter_index,omitempty"`

	// Taint state at this location: tainted, sanitized, unknown
	TaintState string `json:"taint_state,omitempty"`

	// Transformation applied: encode, decode, escape, hash, encrypt, etc.
	Transformation string `json:"transformation,omitempty"`

	// Notes for human understanding
	Notes string `json:"notes,omitempty"`
}

DataFlowLocation represents a location in a data flow trace.

func NewDataFlowLocation

func NewDataFlowLocation(path string, line, column int, content string) DataFlowLocation

NewDataFlowLocation creates a new DataFlowLocation.

func (DataFlowLocation) AsSanitizer

func (loc DataFlowLocation) AsSanitizer() DataFlowLocation

AsSanitizer marks this location as a sanitizer.

func (DataFlowLocation) AsSink

func (loc DataFlowLocation) AsSink() DataFlowLocation

AsSink marks this location as a taint sink.

func (DataFlowLocation) AsSource

func (loc DataFlowLocation) AsSource() DataFlowLocation

AsSource marks this location as a taint source.

func (DataFlowLocation) WithFunction

func (loc DataFlowLocation) WithFunction(fn string) DataFlowLocation

WithFunction sets the function context for the location.

func (DataFlowLocation) WithLabel

func (loc DataFlowLocation) WithLabel(label string) DataFlowLocation

WithLabel sets the label for the location.

func (DataFlowLocation) WithOperation

func (loc DataFlowLocation) WithOperation(op string) DataFlowLocation

WithOperation sets the operation type for the location.

type DataFlowLocationType

type DataFlowLocationType string

DataFlowLocationType represents the type of a location in dataflow.

const (
	// DataFlowLocationSource is where untrusted data enters the system
	DataFlowLocationSource DataFlowLocationType = "source"

	// DataFlowLocationSink is where data reaches a dangerous function
	DataFlowLocationSink DataFlowLocationType = "sink"

	// DataFlowLocationPropagator is where data is passed/assigned
	DataFlowLocationPropagator DataFlowLocationType = "propagator"

	// DataFlowLocationSanitizer is where data is cleaned/escaped
	DataFlowLocationSanitizer DataFlowLocationType = "sanitizer"

	// DataFlowLocationTransform is where data is transformed (not sanitized)
	DataFlowLocationTransform DataFlowLocationType = "transform"
)

func AllDataFlowLocationTypes added in v1.6.0

func AllDataFlowLocationTypes() []DataFlowLocationType

AllDataFlowLocationTypes returns every valid data flow location type.

type DeFiDetails

type DeFiDetails struct {
	// Protocol name: uniswap, aave, compound, etc.
	ProtocolName string `json:"protocol_name,omitempty"`

	// Protocol type: dex, lending, yield, bridge, derivatives, etc.
	ProtocolType string `json:"protocol_type,omitempty"`

	// Protocol version
	Version string `json:"version,omitempty"`

	// Total Value Locked (TVL) in USD
	TVLUSD float64 `json:"tvl_usd,omitempty"`

	// Supported chains
	SupportedChains []string `json:"supported_chains,omitempty"`

	// Core contracts
	CoreContracts []CoreContract `json:"core_contracts,omitempty"`

	// Governance token address
	GovernanceToken string `json:"governance_token,omitempty"`

	// Is audited
	Audited bool `json:"audited,omitempty"`

	// Audit reports
	AuditReports []AuditReport `json:"audit_reports,omitempty"`

	// Has bug bounty
	HasBugBounty bool `json:"has_bug_bounty,omitempty"`

	// Bug bounty platform: immunefi, hackerone, etc.
	BugBountyPlatform string `json:"bug_bounty_platform,omitempty"`

	// Max bug bounty payout
	MaxBountyUSD float64 `json:"max_bounty_usd,omitempty"`

	// Timelock duration (for governance)
	TimelockDuration int `json:"timelock_duration,omitempty"`

	// Is paused
	Paused bool `json:"paused,omitempty"`
}

DeFiDetails contains DeFi protocol-specific details.

type Dependency

type Dependency struct {
	// Unique identifier for this dependency
	ID string `json:"id,omitempty"`

	// Package name
	Name string `json:"name"`

	// Package version
	Version string `json:"version,omitempty"`

	// Package type: library, framework, application, os
	Type string `json:"type,omitempty"`

	// Ecosystem: npm, pypi, maven, gomod, etc.
	Ecosystem string `json:"ecosystem,omitempty"`

	// Package URL (PURL)
	PURL string `json:"purl,omitempty"`

	// Unique identifier from scanner (e.g., Trivy UID)
	UID string `json:"uid,omitempty"`

	// License information
	Licenses []string `json:"licenses,omitempty"`

	// Dependency relationship: direct, indirect, root, transit
	Relationship string `json:"relationship,omitempty"`

	// Dependencies (list of IDs or names this component depends on)
	DependsOn []string `json:"depends_on,omitempty"`

	// File path where this dependency is defined
	Path string `json:"path,omitempty"` // file path

	// Location in file (deprecated, use Locations)
	Location *FindingLocation `json:"location,omitempty"`

	// All locations where this dependency is defined
	Locations []DependencyLocation `json:"locations,omitempty"`

	// Custom properties
	Properties Properties `json:"properties,omitempty"`
}

Dependency represents a software component or library.

type DependencyLocation

type DependencyLocation struct {
	// File path
	Path string `json:"path,omitempty"`

	// Start line number
	StartLine int `json:"start_line,omitempty"`

	// End line number
	EndLine int `json:"end_line,omitempty"`

	// Start column number
	StartColumn int `json:"start_column,omitempty"`

	// End column number
	EndColumn int `json:"end_column,omitempty"`
}

DependencyLocation represents a location where a dependency is defined.

type DetectionType added in v1.6.0

type DetectionType string

DetectionType says how sure the source is that the issue is present.

const (
	// The source verified the issue (a Qualys Confirmed detection).
	DetectionTypeConfirmed DetectionType = "confirmed"
	// The source could not verify it (a Qualys Potential detection, a
	// version-only match).
	DetectionTypePotential DetectionType = "potential"
	// Information gathered, not a vulnerability.
	DetectionTypeInfo DetectionType = "info"
)

func AllDetectionTypes added in v1.6.0

func AllDetectionTypes() []DetectionType

AllDetectionTypes returns every valid detection type.

func NormalizeDetectionType added in v1.6.0

func NormalizeDetectionType(native string) (DetectionType, bool)

NormalizeDetectionType maps a native detection type (Qualys TYPE Confirmed / Potential / Info, "vuln", "ig", ...) to a DetectionType.

func (DetectionType) IsValid added in v1.6.0

func (d DetectionType) IsValid() bool

IsValid reports whether d is a recognized detection type.

type DiscoveredURLInput

type DiscoveredURLInput struct {
	URL        string
	Method     string
	Source     string
	StatusCode int
	Depth      int
	Parent     string
	Type       string
	Extension  string

	// ContentType of the response (1.6 endpoints).
	ContentType string

	// Params are parameters seen besides the query: form fields, JSON
	// members, headers. Names only.
	Params []EndpointParam
}

DiscoveredURLInput represents a discovered URL/endpoint.

type DomainTechnical

type DomainTechnical struct {
	// Registrar information
	Registrar string `json:"registrar,omitempty"`

	// Registration date
	RegisteredAt *time.Time `json:"registered_at,omitempty"`

	// Expiration date
	ExpiresAt *time.Time `json:"expires_at,omitempty"`

	// Nameservers
	Nameservers []string `json:"nameservers,omitempty"`

	// DNS records
	DNSRecords []DNSRecord `json:"dns_records,omitempty"`

	// WHOIS data
	WHOIS map[string]string `json:"whois,omitempty"`
}

DomainTechnical contains domain-specific technical details.

type Endpoint added in v1.6.0

type Endpoint struct {
	// ID names the endpoint within the report (finding.web.endpoint_ref).
	ID string `json:"id,omitempty"`

	// Origin is the normalised origin, "https://api.example.com".
	Origin string `json:"origin"`

	// OriginRef names the http_service asset of the origin in this report.
	OriginRef string `json:"origin_ref,omitempty"`

	// Method is an HTTP method, or ANY when unknown.
	Method string `json:"method,omitempty"`

	// Path is the concrete path, without query or fragment.
	Path string `json:"path"`

	// Template is the producer's path template; a receiver recomputes it.
	Template string `json:"template,omitempty"`

	Kind   EndpointKind   `json:"kind,omitempty"`
	Source EndpointSource `json:"source,omitempty"`

	// Parent is the page the endpoint was found on, redacted (no query
	// values, user info or fragment).
	Parent string `json:"parent,omitempty"`

	StatusCode  int          `json:"status_code,omitempty"`
	ContentType string       `json:"content_type,omitempty"`
	Auth        EndpointAuth `json:"auth,omitempty"`

	Technologies []Technology `json:"technologies,omitempty"`

	// Params are the parameters the endpoint takes: names and hints,
	// never values.
	Params []EndpointParam `json:"params,omitempty"`
}

Endpoint is one method and path a web origin serves, as a tool saw it.

type EndpointAuth added in v1.6.0

type EndpointAuth string

EndpointAuth is whether an endpoint asked for authentication.

const (
	EndpointAuthNone          EndpointAuth = "none"
	EndpointAuthRequired      EndpointAuth = "required"
	EndpointAuthRedirectLogin EndpointAuth = "redirect_login"
	EndpointAuthUnknown       EndpointAuth = "unknown"
)

Endpoint authentication states.

func AllEndpointAuths added in v1.6.0

func AllEndpointAuths() []EndpointAuth

AllEndpointAuths returns every endpoint authentication state.

type EndpointKind added in v1.6.0

type EndpointKind string

EndpointKind is what an endpoint serves.

const (
	EndpointKindPage      EndpointKind = "page"
	EndpointKindAPI       EndpointKind = "api"
	EndpointKindScript    EndpointKind = "script"
	EndpointKindForm      EndpointKind = "form"
	EndpointKindGraphQL   EndpointKind = "graphql"
	EndpointKindWebSocket EndpointKind = "websocket"
	EndpointKindStatic    EndpointKind = "static"
	EndpointKindOther     EndpointKind = "other"
)

Endpoint kinds.

func AllEndpointKinds added in v1.6.0

func AllEndpointKinds() []EndpointKind

AllEndpointKinds returns every endpoint kind.

type EndpointParam added in v1.6.0

type EndpointParam struct {
	Location ParamLocation `json:"location"`
	Name     string        `json:"name"`
	TypeHint string        `json:"type_hint,omitempty"`
	Required bool          `json:"required,omitempty"`
}

EndpointParam is one parameter of an endpoint. It has no value member: a value is refused by every strict receiver.

type EndpointSource added in v1.6.0

type EndpointSource string

EndpointSource is how an endpoint was found.

const (
	EndpointSourceCrawl   EndpointSource = "crawl"
	EndpointSourceJS      EndpointSource = "js"
	EndpointSourceSitemap EndpointSource = "sitemap"
	EndpointSourceRobots  EndpointSource = "robots"
	EndpointSourceSpec    EndpointSource = "spec"
	EndpointSourceHAR     EndpointSource = "har"
	EndpointSourceArchive EndpointSource = "archive"
	EndpointSourceDAST    EndpointSource = "dast"
	EndpointSourceProbe   EndpointSource = "probe"
)

Endpoint sources.

func AllEndpointSources added in v1.6.0

func AllEndpointSources() []EndpointSource

AllEndpointSources returns every endpoint source.

type EvidenceArtifact added in v1.6.0

type EvidenceArtifact struct {
	MediaType string `json:"media_type"`
	SHA256    string `json:"sha256"`
	Size      int64  `json:"size,omitempty"`
	Ref       string `json:"ref,omitempty"`
}

EvidenceArtifact names binary evidence stored apart from the report.

type EvidenceFile added in v1.6.0

type EvidenceFile struct {
	Path      string `json:"path"`
	StartLine int    `json:"start_line,omitempty"`
	EndLine   int    `json:"end_line,omitempty"`
	Snippet   string `json:"snippet,omitempty"`
}

EvidenceFile is an excerpt of a file.

type EvidenceHTTP added in v1.6.0

type EvidenceHTTP struct {
	Request  *EvidenceRequest  `json:"request,omitempty"`
	Response *EvidenceResponse `json:"response,omitempty"`
}

EvidenceHTTP is one HTTP request and its response.

type EvidenceHeader added in v1.6.0

type EvidenceHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

EvidenceHeader is one header, in captured order.

type EvidenceItem added in v1.6.0

type EvidenceItem struct {
	// Kind is a known kind or another ^[a-z0-9][a-z0-9_.-]{0,63}$ name.
	Kind string `json:"kind"`

	// Version of the kind's body format (1).
	Version int `json:"version,omitempty"`

	Label      string     `json:"label,omitempty"`
	CapturedAt *time.Time `json:"captured_at,omitempty"`

	// ContentSHA256 is "sha256:<hex>" over the item as captured, before any
	// masking or truncation.
	ContentSHA256 string `json:"content_sha256,omitempty"`

	// http_exchange
	HTTP *EvidenceHTTP `json:"http,omitempty"`

	// Match locates what matched in the request or the response.
	Match []EvidenceMatch `json:"match,omitempty"`

	// Extracted are values the tool extracted (versions, banners).
	Extracted []string `json:"extracted,omitempty"`

	// Text is the content of raw_text, command_output and curl items.
	Text string `json:"text,omitempty"`

	// Protocol of raw_text ("dns", "tls", "ssh", "banner", "smtp", ...).
	Protocol string `json:"protocol,omitempty"`

	// command_output
	Command  string `json:"command,omitempty"`
	ExitCode *int   `json:"exit_code,omitempty"`

	// file_excerpt
	File *EvidenceFile `json:"file,omitempty"`

	// screenshot (and any binary evidence)
	Artifact *EvidenceArtifact `json:"artifact,omitempty"`

	// Data holds the fields of a kind this module does not know; empty for
	// known kinds.
	Data map[string]any `json:"data,omitempty"`

	// Sensitive marks the spans that hold secrets or personal data.
	Sensitive []SensitiveSpan `json:"sensitive,omitempty"`
}

EvidenceItem is one piece of evidence.

func CurlEvidence added in v1.6.0

func CurlEvidence(command string) (EvidenceItem, bool)

CurlEvidence is a curl item holding the command, capped. Call MarkSensitive with the exchange it reproduces to mark the values the command repeats.

func HTTPExchangeFromHAR added in v1.6.0

func HTTPExchangeFromHAR(entry []byte) (EvidenceItem, error)

HTTPExchangeFromHAR builds an http_exchange item from one HAR 1.2 entry (log.entries[i]). The item is capped and its sensitive values are marked.

func HTTPExchangeFromRaw added in v1.6.0

func HTTPExchangeFromRaw(request, response, baseURL string) (EvidenceItem, bool)

HTTPExchangeFromRaw builds an http_exchange item from a raw HTTP/1.x request and response as a tool printed them. A relative request target is resolved against baseURL. It reports false when neither part holds an HTTP message. The item is capped and its sensitive values are marked.

type EvidenceMatch added in v1.6.0

type EvidenceMatch struct {
	Location string `json:"location"`
	Part     string `json:"part"`
	Start    *int   `json:"start,omitempty"`
	End      *int   `json:"end,omitempty"`
	Matcher  string `json:"matcher,omitempty"`
}

EvidenceMatch locates what a matcher matched. Start and End are byte offsets into the part as sent.

type EvidenceRequest added in v1.6.0

type EvidenceRequest struct {
	Method        string           `json:"method,omitempty"`
	URL           string           `json:"url,omitempty"`
	HTTPVersion   string           `json:"http_version,omitempty"`
	Headers       []EvidenceHeader `json:"headers,omitempty"`
	Body          string           `json:"body,omitempty"`
	BodyEncoding  string           `json:"body_encoding,omitempty"`
	BodyTruncated bool             `json:"body_truncated,omitempty"`
	BodySize      int64            `json:"body_size,omitempty"`
}

EvidenceRequest is a captured HTTP request.

type EvidenceResponse added in v1.6.0

type EvidenceResponse struct {
	Status        int              `json:"status,omitempty"`
	Reason        string           `json:"reason,omitempty"`
	HTTPVersion   string           `json:"http_version,omitempty"`
	Headers       []EvidenceHeader `json:"headers,omitempty"`
	Body          string           `json:"body,omitempty"`
	BodyEncoding  string           `json:"body_encoding,omitempty"`
	BodyTruncated bool             `json:"body_truncated,omitempty"`
	BodySize      int64            `json:"body_size,omitempty"`
	TimeMs        int64            `json:"time_ms,omitempty"`
}

EvidenceResponse is a captured HTTP response.

type Finding

type Finding struct {
	// Unique identifier for this finding within the report
	ID string `json:"id,omitempty"`

	// Finding type (required): vulnerability, secret, misconfiguration, compliance
	Type FindingType `json:"type"`

	// Short title (required)
	Title string `json:"title"`

	// Detailed description
	Description string `json:"description,omitempty"`

	// Primary message to display (the main human-readable finding message)
	// This is distinct from Title (short) and Description (detailed)
	// If not set, Title will be used as the message
	Message string `json:"message,omitempty"`

	// Severity (required): critical, high, medium, low, info
	Severity Severity `json:"severity"`

	// Confidence score 0-100
	Confidence int `json:"confidence,omitempty"`

	// Impact level: critical, high, medium, low (for risk assessment)
	Impact string `json:"impact,omitempty"`

	// Likelihood level: high, medium, low (for risk assessment)
	Likelihood string `json:"likelihood,omitempty"`

	// Finding category/class
	Category string `json:"category,omitempty"`

	// Vulnerability class(es): SQL Injection, XSS, Command Injection, etc.
	VulnerabilityClass []string `json:"vulnerability_class,omitempty"`

	// Subcategory: audit, vuln, secure default, etc.
	Subcategory []string `json:"subcategory,omitempty"`

	// Rule/check ID that detected this finding
	RuleID string `json:"rule_id,omitempty"`

	// Rule name
	RuleName string `json:"rule_name,omitempty"`

	// Reference to asset ID within this report
	AssetRef string `json:"asset_ref,omitempty"`

	// Direct asset value (if not using AssetRef)
	AssetValue string `json:"asset_value,omitempty"`

	// Asset type (if using AssetValue)
	AssetType AssetType `json:"asset_type,omitempty"`

	// Location information (for code-based findings)
	Location *FindingLocation `json:"location,omitempty"`

	// Network location (for network/host findings, e.g. Nessus/Tenable): the
	// port/protocol/service the finding was observed on. Distinct from the
	// code-centric Location above.
	Network *NetworkLocation `json:"network,omitempty"`

	// Evidence is the scanner's raw proof/output for this finding (e.g. a Nessus
	// plugin_output, a probe response). Free text; redact secrets before display.
	Evidence string `json:"evidence,omitempty"`

	// Vulnerability-specific details
	Vulnerability *VulnerabilityDetails `json:"vulnerability,omitempty"`

	// Secret-specific details
	Secret *SecretDetails `json:"secret,omitempty"`

	// Misconfiguration-specific details
	Misconfiguration *MisconfigurationDetails `json:"misconfiguration,omitempty"`

	// Compliance-specific details
	Compliance *ComplianceDetails `json:"compliance,omitempty"`

	// Web3-specific details (smart contract vulnerabilities)
	Web3 *Web3VulnerabilityDetails `json:"web3,omitempty"`

	// Remediation guidance
	Remediation *Remediation `json:"remediation,omitempty"`

	// References (URLs)
	References []string `json:"references,omitempty"`

	// Tags
	Tags []string `json:"tags,omitempty"`

	// Fingerprint for deduplication
	Fingerprint string `json:"fingerprint,omitempty"`

	// Partial fingerprints - contributing identity components (SARIF partialFingerprints)
	PartialFingerprints map[string]string `json:"partial_fingerprints,omitempty"`

	// Correlation ID - groups logically identical results across runs (SARIF correlationGuid)
	CorrelationID string `json:"correlation_id,omitempty"`

	// Baseline state - status relative to previous scan (SARIF baselineState)
	// Values: new, unchanged, updated, absent
	BaselineState string `json:"baseline_state,omitempty"`

	// Kind - evaluation state of the finding (SARIF kind)
	// Values: not_applicable, pass, fail, review, open, informational
	Kind string `json:"kind,omitempty"`

	// Rank - priority/importance score 0-100 (SARIF rank)
	Rank float64 `json:"rank,omitempty"`

	// Occurrence count - number of times this result was observed (SARIF occurrenceCount)
	OccurrenceCount int `json:"occurrence_count,omitempty"`

	// Related locations - additional locations related to this finding (SARIF relatedLocations)
	RelatedLocations []*FindingLocation `json:"related_locations,omitempty"`

	// Stacks - call stacks relevant to the finding (SARIF stacks)
	Stacks []*StackTrace `json:"stacks,omitempty"`

	// Attachments - relevant artifacts or evidence (SARIF attachments)
	Attachments []*Attachment `json:"attachments,omitempty"`

	// Work item URIs - URIs of associated issues/tickets (SARIF workItemUris)
	WorkItemURIs []string `json:"work_item_uris,omitempty"`

	// Hosted viewer URI - URI to view in hosted viewer (SARIF hostedViewerUri)
	HostedViewerURI string `json:"hosted_viewer_uri,omitempty"`

	// First seen timestamp
	FirstSeenAt *time.Time `json:"first_seen_at,omitempty"`

	// Last seen timestamp
	LastSeenAt *time.Time `json:"last_seen_at,omitempty"`

	// Finding status: open, resolved, false_positive, accepted_risk, in_progress
	Status FindingStatus `json:"status,omitempty"`

	// Data flow trace for taint analysis (source -> intermediate -> sink)
	DataFlow *DataFlow `json:"data_flow,omitempty"`

	// Git author who introduced the finding
	Author string `json:"author,omitempty"`

	// Author email
	AuthorEmail string `json:"author_email,omitempty"`

	// Commit date when the finding was introduced
	CommitDate *time.Time `json:"commit_date,omitempty"`

	// Suppression information (if finding is suppressed)
	Suppression *Suppression `json:"suppression,omitempty"`

	// CTEM: Exposure information
	Exposure *FindingExposure `json:"exposure,omitempty"`

	// CTEM: Remediation context
	RemediationContext *RemediationContext `json:"remediation_context,omitempty"`

	// CTEM: Business impact assessment
	BusinessImpact *BusinessImpact `json:"business_impact,omitempty"`

	// The finding as the source tool names it: native id, severity, status,
	// detection type, credentialed flag, raw record reference.
	Native *NativeIdentity `json:"native,omitempty"`

	// Every score of the finding with its source and date (CVSS v3.1 and
	// v4.0 together, vendor scores, EPSS, SSVC). The vulnerability.cvss_*
	// members stay the primary CVSS score.
	Scores []Score `json:"scores,omitempty"`

	// Exploitability statement (VEX) about this finding's vulnerability.
	VEX *VEX `json:"vex,omitempty"`

	// The finding's history as the source tracks it.
	SourceLifecycle *SourceLifecycle `json:"source_lifecycle,omitempty"`

	// Source fields no CTIS member holds, as strings, so an importer drops
	// nothing silently. Bounded: at most 64 entries, keys of 128 and values
	// of 4096 bytes, 32 KiB in all. Use SetSourceExtra to stay within it.
	SourceExtra map[string]string `json:"source_extra,omitempty"`

	// MITRE ATT&CK techniques the finding enables an adversary to use
	// ("T1190"), at most 20 (1.5). A producer hint; receivers validate the
	// id format and never trust it for prioritization alone.
	Attack []string `json:"attack,omitempty"`

	// Web is where on a web origin the finding was observed: the redacted
	// URL, the method and the parameter (1.6).
	Web *WebLocation `json:"web,omitempty"`

	// EvidenceItems are typed evidence of the finding (1.6, at most 20):
	// HTTP exchanges, raw text, command output, file excerpts, screenshots.
	// They MAY carry sensitive values only inside spans marked in their
	// sensitive list; receivers mask those before display or forwarding.
	EvidenceItems []EvidenceItem `json:"evidence_items,omitempty"`

	// Custom properties
	Properties Properties `json:"properties,omitempty"`
}

Finding represents a security finding.

type FindingExposure

type FindingExposure struct {
	// Exposure vector: network, local, physical, adjacent_net
	Vector string `json:"vector,omitempty"`

	// Is the finding reachable from the network
	IsNetworkAccessible bool `json:"is_network_accessible,omitempty"`

	// Is the finding directly reachable from the internet
	IsInternetAccessible bool `json:"is_internet_accessible,omitempty"`

	// Prerequisites for exploitation: auth_required, mfa_required, local_access, etc.
	AttackPrerequisites string `json:"attack_prerequisites,omitempty"`
}

FindingExposure contains CTEM exposure information for a finding.

type FindingLocation

type FindingLocation struct {
	// File path
	Path string `json:"path,omitempty"`

	// Start line number (1-indexed)
	StartLine int `json:"start_line,omitempty"`

	// End line number
	EndLine int `json:"end_line,omitempty"`

	// Start column
	StartColumn int `json:"start_column,omitempty"`

	// End column
	EndColumn int `json:"end_column,omitempty"`

	// Code snippet
	Snippet string `json:"snippet,omitempty"`

	// Branch name (for repository findings)
	Branch string `json:"branch,omitempty"`

	// Commit SHA
	CommitSHA string `json:"commit_sha,omitempty"`

	// Logical location (function, class, method name)
	LogicalLocation *LogicalLocation `json:"logical_location,omitempty"`

	// Context region (surrounding code for better understanding)
	ContextSnippet string `json:"context_snippet,omitempty"`

	// Context start line (for context_snippet)
	ContextStartLine int `json:"context_start_line,omitempty"`
}

FindingLocation contains location information for code-based findings.

type FindingStatus

type FindingStatus string

FindingStatus represents the status of a finding.

const (
	FindingStatusOpen          FindingStatus = "open"
	FindingStatusResolved      FindingStatus = "resolved"
	FindingStatusSuppressed    FindingStatus = "suppressed"
	FindingStatusFalsePositive FindingStatus = "false_positive"
	FindingStatusAcceptedRisk  FindingStatus = "accepted_risk"
	FindingStatusInProgress    FindingStatus = "in_progress"
)

func AllFindingStatuses added in v1.1.0

func AllFindingStatuses() []FindingStatus

AllFindingStatuses returns every valid finding status. Kept in sync with the FindingStatus enum in schemas/v1/finding.json.

func (FindingStatus) IsValid added in v1.1.0

func (s FindingStatus) IsValid() bool

IsValid reports whether s is a recognized finding status.

type FindingType

type FindingType string

FindingType represents the type of a finding.

const (
	FindingTypeVulnerability    FindingType = "vulnerability"
	FindingTypeSecret           FindingType = "secret"
	FindingTypeMisconfiguration FindingType = "misconfiguration"
	FindingTypeCompliance       FindingType = "compliance"
	FindingTypeWeb3             FindingType = "web3" // Smart contract vulnerabilities
)

func AllFindingTypes

func AllFindingTypes() []FindingType

AllFindingTypes returns all valid finding types.

func (FindingType) IsValid

func (t FindingType) IsValid() bool

IsValid checks if the finding type is valid.

func (FindingType) String

func (t FindingType) String() string

String returns the string representation.

type FixRegex

type FixRegex struct {
	// Regular expression pattern to match
	Regex string `json:"regex,omitempty"`

	// Replacement string (may contain capture group references like $1, $2)
	Replacement string `json:"replacement,omitempty"`

	// Number of replacements to make (0 = all)
	Count int `json:"count,omitempty"`
}

FixRegex contains regex-based auto-fix information. Used by tools like Semgrep that can provide regex replacement patterns.

type FlashLoanIssue

type FlashLoanIssue struct {
	// Flash loan provider: aave, dydx, uniswap, balancer
	Provider string `json:"provider,omitempty"`

	// Attack type: price_manipulation, governance_attack, collateral_theft
	AttackType string `json:"attack_type,omitempty"`

	// Required capital for attack
	RequiredCapitalUSD float64 `json:"required_capital_usd,omitempty"`

	// Potential profit
	PotentialProfitUSD float64 `json:"potential_profit_usd,omitempty"`

	// Attack steps
	AttackSteps []string `json:"attack_steps,omitempty"`
}

FlashLoanIssue contains details about flash loan attack vulnerabilities.

type GasIssue

type GasIssue struct {
	// Current gas cost
	CurrentGas int64 `json:"current_gas,omitempty"`

	// Optimized gas cost
	OptimizedGas int64 `json:"optimized_gas,omitempty"`

	// Gas savings percentage
	SavingsPercent float64 `json:"savings_percent,omitempty"`

	// Optimization suggestion
	Suggestion string `json:"suggestion,omitempty"`
}

GasIssue contains details about gas optimization issues.

type Geolocation

type Geolocation struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Accuracy  float64 `json:"accuracy,omitempty"` // in meters
}

Geolocation contains geographic coordinates.

type IPAddressTechnical

type IPAddressTechnical struct {
	// IP version: 4 or 6
	Version int `json:"version,omitempty"`

	// Hostname (if resolved)
	Hostname string `json:"hostname,omitempty"`

	// ASN information
	ASN int `json:"asn,omitempty"`

	// ASN organization
	ASNOrg string `json:"asn_org,omitempty"`

	// Country code
	Country string `json:"country,omitempty"`

	// City
	City string `json:"city,omitempty"`

	// Open ports
	Ports []PortInfo `json:"ports,omitempty"`

	// Geolocation
	Geolocation *Geolocation `json:"geolocation,omitempty"`
}

IPAddressTechnical contains IP address-specific technical details.

type IdentityHints added in v1.6.0

type IdentityHints struct {
	// Fully qualified DNS name the scanner resolved.
	FQDN string `json:"fqdn,omitempty"`

	// NetBIOS name.
	NetBIOSName string `json:"netbios_name,omitempty"`

	// MAC addresses observed.
	MACAddresses []string `json:"mac_addresses,omitempty"`

	// CPE of the detected operating system (cpe:/o:... or cpe:2.3:o:...).
	OSCPE string `json:"os_cpe,omitempty"`

	// Cloud resource id the scanner reported (instance id, ARN).
	CloudResourceID string `json:"cloud_resource_id,omitempty"`

	// Id of the scanner's own agent installed on the host (a Nessus or
	// Qualys agent UUID). Unique per scanner, not across scanners. The Go
	// name says whose agent it is, so it is not read as a receiver's own
	// endpoint software.
	ScannerAgentID string `json:"agent_id,omitempty"`
}

IdentityHints are what a scanner observed about a host that helps match it to the same host seen by another tool. Unlike AssetIdentifiers, which are read from the asset itself and trusted as identity, hints are remote observations (a NetBIOS name from a probe, a MAC from an ARP table) and a receiver weighs them accordingly.

type LiveHostInput

type LiveHostInput struct {
	URL           string
	Host          string
	IP            string
	Port          int
	Scheme        string
	StatusCode    int
	ContentLength int64
	Title         string
	WebServer     string
	ContentType   string
	Technologies  []string
	CDN           string
	TLSVersion    string
	Redirect      string
	ResponseTime  int64

	// CDNType is what CDN names: "cdn", "waf" or "cloud" (httpx cdn_type).
	CDNType string
	// TLS is the leaf certificate seen in the TLS handshake (httpx
	// -tls-grab); nil when the probe did not grab one.
	TLS *TLSLeafInput
	// FaviconMMH3 is the mmh3 hash of the favicon (httpx -favicon), as
	// Shodan prints it: a signed 32-bit decimal.
	FaviconMMH3 string
	// JARM is the JARM TLS server fingerprint (62 hex characters).
	JARM string
	// ASN is the autonomous system of the host's address (httpx -asn).
	ASN *ASNInput
}

LiveHostInput represents an HTTP/HTTPS live host.

type LogicalLocation

type LogicalLocation struct {
	// Fully qualified name (e.g., "pkg.MyClass.myMethod")
	FullyQualifiedName string `json:"fully_qualified_name,omitempty"`

	// Function/method name
	Name string `json:"name,omitempty"`

	// Kind: function, method, class, module, namespace
	Kind string `json:"kind,omitempty"`

	// Parent logical location index (for nested locations)
	ParentIndex int `json:"parent_index,omitempty"`
}

LogicalLocation represents a logical code location (function, class, method).

type MisconfigurationDetails

type MisconfigurationDetails struct {
	// Policy/check ID
	PolicyID string `json:"policy_id,omitempty"`

	// Policy name
	PolicyName string `json:"policy_name,omitempty"`

	// Aqua Vulnerability Database ID (e.g., AVD-AWS-0001)
	AVDID string `json:"avd_id,omitempty"`

	// Resource type
	ResourceType string `json:"resource_type,omitempty"`

	// Resource name
	ResourceName string `json:"resource_name,omitempty"`

	// Cloud provider (e.g., AWS, GCP, Azure)
	Provider string `json:"provider,omitempty"`

	// Service (e.g., S3, EC2, IAM)
	Service string `json:"service,omitempty"`

	// Namespace (e.g., builtin.aws.s3)
	Namespace string `json:"namespace,omitempty"`

	// Rego query path
	Query string `json:"query,omitempty"`

	// Expected value
	Expected string `json:"expected,omitempty"`

	// Actual value
	Actual string `json:"actual,omitempty"`

	// Cause description
	Cause string `json:"cause,omitempty"`
}

MisconfigurationDetails contains misconfiguration-specific details.

type NFTCollectionDetails

type NFTCollectionDetails struct {
	// Collection name
	Name string `json:"name,omitempty"`

	// Collection symbol
	Symbol string `json:"symbol,omitempty"`

	// Token standard: erc721, erc1155
	Standard string `json:"standard,omitempty"`

	// Total supply
	TotalSupply int64 `json:"total_supply,omitempty"`

	// Max supply
	MaxSupply int64 `json:"max_supply,omitempty"`

	// Unique holders
	HolderCount int64 `json:"holder_count,omitempty"`

	// Floor price (in native token)
	FloorPrice string `json:"floor_price,omitempty"`

	// Floor price USD
	FloorPriceUSD float64 `json:"floor_price_usd,omitempty"`

	// Total volume (in native token)
	TotalVolume string `json:"total_volume,omitempty"`

	// Total volume USD
	TotalVolumeUSD float64 `json:"total_volume_usd,omitempty"`

	// Royalty percentage
	RoyaltyPercent float64 `json:"royalty_percent,omitempty"`

	// Royalty recipient
	RoyaltyRecipient string `json:"royalty_recipient,omitempty"`

	// Marketplace URLs
	Marketplaces []string `json:"marketplaces,omitempty"`

	// Is revealed
	Revealed bool `json:"revealed,omitempty"`

	// Base URI
	BaseURI string `json:"base_uri,omitempty"`

	// Metadata storage: ipfs, arweave, centralized
	MetadataStorage string `json:"metadata_storage,omitempty"`

	// Creator address
	Creator string `json:"creator,omitempty"`
}

NFTCollectionDetails contains NFT collection-specific details.

type NativeIdentity added in v1.6.0

type NativeIdentity struct {
	// Vocabulary of the native values below. Selects the mapping tables of
	// NormalizeNativeSeverity, NormalizeNativeStatus and
	// NormalizeDetectionType.
	Scheme NativeScheme `json:"scheme,omitempty"`

	// The tool's id of the vulnerability or check: a Nessus plugin ID, a
	// Qualys QID, a DefectDojo vuln_id_from_tool, a SARIF rule id.
	VulnID string `json:"vuln_id,omitempty"`

	// The tool's id of this occurrence (DefectDojo unique_id_from_tool, a
	// Tenable or Qualys detection id), when it has one.
	InstanceID string `json:"instance_id,omitempty"`

	// The tool's family or category of the check (Nessus plugin family,
	// Qualys vulnerability category).
	Family string `json:"family,omitempty"`

	// The tool's severity exactly as reported ("4", "5", "High", "error").
	// finding.severity holds the normalized level.
	Severity string `json:"severity,omitempty"`

	// The tool's status exactly as reported ("Re-Opened", "fixed",
	// "risk_accepted"). finding.status and source_lifecycle.state hold the
	// normalized values.
	Status string `json:"status,omitempty"`

	// Whether the tool confirmed the issue or only suspects it.
	DetectionType DetectionType `json:"detection_type,omitempty"`

	// Whether the scan that found it was authenticated on the target. Absent
	// means unknown; false means the scan ran without credentials.
	Credentialed *bool `json:"credentialed,omitempty"`

	// Where the raw record can be found again: a URL into the source, or a
	// locator inside the imported file. Informational; receivers never fetch
	// it.
	RawRef string `json:"raw_ref,omitempty"`
}

NativeIdentity is the finding as the source tool names it.

type NativeScheme added in v1.6.0

type NativeScheme string

NativeScheme names the vocabulary of a finding's native values.

const (
	NativeSchemeNessus     NativeScheme = "nessus"
	NativeSchemeQualys     NativeScheme = "qualys"
	NativeSchemeDefectDojo NativeScheme = "defectdojo"
	NativeSchemeSARIF      NativeScheme = "sarif"
	NativeSchemeOther      NativeScheme = "other"
)

func AllNativeSchemes added in v1.6.0

func AllNativeSchemes() []NativeScheme

AllNativeSchemes returns every valid native scheme.

func (NativeScheme) IsValid added in v1.6.0

func (s NativeScheme) IsValid() bool

IsValid reports whether s is a recognized native scheme.

type NetworkLocation added in v1.1.0

type NetworkLocation struct {
	// Host the finding was observed on (IP or hostname). Optional when the
	// finding already references its host asset via AssetRef/AssetValue.
	Host string `json:"host,omitempty"`

	// Port number (0 = not port-specific / general host finding).
	Port int `json:"port,omitempty"`

	// Transport protocol: tcp, udp.
	Protocol string `json:"protocol,omitempty"`

	// Service / application protocol on the port: https, ssh, smb, mysql, etc.
	Service string `json:"service,omitempty"`
}

NetworkLocation describes where a network/host finding was observed. Used by network vulnerability scanners (Nessus/Tenable, etc.) where a finding is tied to a port/service rather than a file/line.

type OpenPortInput

type OpenPortInput struct {
	Host     string
	IP       string
	Port     int
	Protocol string
	Service  string
	Version  string
	Banner   string
}

OpenPortInput represents an open port.

type OracleManipulationIssue

type OracleManipulationIssue struct {
	// Oracle type: chainlink, uniswap_twap, custom
	OracleType string `json:"oracle_type,omitempty"`

	// Oracle address
	OracleAddress string `json:"oracle_address,omitempty"`

	// Manipulation method: flash_loan, sandwich, time_manipulation
	ManipulationMethod string `json:"manipulation_method,omitempty"`

	// Price impact possible
	PriceImpactPercent float64 `json:"price_impact_percent,omitempty"`

	// Missing checks
	MissingChecks []string `json:"missing_checks,omitempty"`
}

OracleManipulationIssue contains details about oracle manipulation vulnerabilities.

type ParamLocation added in v1.6.0

type ParamLocation string

ParamLocation is where a request parameter goes.

const (
	ParamLocationQuery      ParamLocation = "query"
	ParamLocationPath       ParamLocation = "path"
	ParamLocationHeader     ParamLocation = "header"
	ParamLocationCookie     ParamLocation = "cookie"
	ParamLocationForm       ParamLocation = "form"
	ParamLocationJSON       ParamLocation = "json"
	ParamLocationMultipart  ParamLocation = "multipart"
	ParamLocationGraphQLArg ParamLocation = "graphql_arg"
)

Parameter locations.

func AllParamLocations added in v1.6.0

func AllParamLocations() []ParamLocation

AllParamLocations returns every parameter location.

type PortInfo

type PortInfo struct {
	Port     int    `json:"port"`
	Protocol string `json:"protocol,omitempty"` // tcp, udp
	State    string `json:"state,omitempty"`    // open, filtered, closed
	Service  string `json:"service,omitempty"`  // http, ssh, etc.
	Banner   string `json:"banner,omitempty"`
	Version  string `json:"version,omitempty"`
}

PortInfo contains information about an open port.

type Properties

type Properties map[string]any

Properties is a property bag for custom properties.

type ReconConverterOptions

type ReconConverterOptions struct {
	// Source tracking
	DiscoverySource string // "agent", "integration", "manual"
	DiscoveryTool   string // Scanner name

	// Default values. DefaultCriticality is business context that a scanner
	// does not know (spec section 4.1); leave it empty unless the caller
	// really has it.
	DefaultCriticality Criticality
	DefaultConfidence  int // 0-100

	// Asset grouping
	GroupByDomain bool // Group subdomains under root domain asset
	GroupByIP     bool // Group ports under IP asset

	// Filtering
	MinConfidence int // Minimum confidence to include
}

ReconConverterOptions configures the conversion from ReconResult to CTIS Report.

func DefaultReconConverterOptions

func DefaultReconConverterOptions() *ReconConverterOptions

DefaultReconConverterOptions returns sensible default options.

type ReconToCTISInput

type ReconToCTISInput struct {
	// Scanner info
	ScannerName    string
	ScannerVersion string
	ReconType      string // subdomain, dns, port, http_probe, url_crawl

	// Target
	Target string

	// Timing
	StartedAt  int64
	FinishedAt int64
	DurationMs int64

	// Results
	Subdomains   []SubdomainInput
	DNSRecords   []DNSRecordInput
	OpenPorts    []OpenPortInput
	LiveHosts    []LiveHostInput
	URLs         []DiscoveredURLInput
	Technologies []TechnologyInput
}

ReconToCTISInput holds the data from a reconnaissance scan result. This is a simplified version of core.ReconResult to avoid import cycles.

type ReentrancyIssue

type ReentrancyIssue struct {
	// Reentrancy type: cross_function, cross_contract, read_only
	Type string `json:"type,omitempty"`

	// Vulnerable external call
	ExternalCall string `json:"external_call,omitempty"`

	// State variable modified after call
	StateModifiedAfterCall string `json:"state_modified_after_call,omitempty"`

	// Entry point function
	EntryPoint string `json:"entry_point,omitempty"`

	// Callback function
	Callback string `json:"callback,omitempty"`

	// Max reentrancy depth possible
	MaxDepth int `json:"max_depth,omitempty"`
}

ReentrancyIssue contains details about reentrancy vulnerabilities.

type Relationship added in v1.6.0

type Relationship struct {
	Type    RelationshipType `json:"type"`
	FromRef string           `json:"from_ref"`
	ToRef   string           `json:"to_ref"`
}

Relationship is a typed edge between two assets of the same report, named by their ids.

type RelationshipType added in v1.6.0

type RelationshipType string

RelationshipType is the type of a relationship between two assets of a report. The set is closed.

const (
	// RelSubdomainOf: from (a subdomain) is a name below to (a domain).
	RelSubdomainOf RelationshipType = "subdomain_of"
	// RelResolvesTo: from (a name) resolves to to (an address).
	RelResolvesTo RelationshipType = "resolves_to"
	// RelCnameOf: from (a name) is an alias of to (a name).
	RelCnameOf RelationshipType = "cname_of"
	// RelExposes: from (a host or address) exposes to (a service or port).
	RelExposes RelationshipType = "exposes"
	// RelServesCertificate: from (a service) serves to (a certificate).
	RelServesCertificate RelationshipType = "serves_certificate"
	// RelHostedBy: from (a service or address) is hosted by to (a provider
	// or a host).
	RelHostedBy RelationshipType = "hosted_by"
)

Relationship types.

func AllRelationshipTypes added in v1.6.0

func AllRelationshipTypes() []RelationshipType

AllRelationshipTypes returns every relationship type.

func (RelationshipType) IsValid added in v1.6.0

func (t RelationshipType) IsValid() bool

IsValid reports whether t is a known relationship type.

type Remediation

type Remediation struct {
	// Short recommendation
	Recommendation string `json:"recommendation,omitempty"`

	// Detailed fix steps
	Steps []string `json:"steps,omitempty"`

	// Effort estimate: trivial, low, medium, high
	Effort string `json:"effort,omitempty"`

	// Fix available
	FixAvailable bool `json:"fix_available,omitempty"`

	// Auto-fixable
	AutoFixable bool `json:"auto_fixable,omitempty"`

	// Suggested fix code - the actual code to replace the vulnerable code
	// For SAST tools like Semgrep that provide auto-fix suggestions
	FixCode string `json:"fix_code,omitempty"`

	// Regex-based fix pattern (for tools that provide regex replacements)
	FixRegex *FixRegex `json:"fix_regex,omitempty"`

	// Reference URLs
	References []string `json:"references,omitempty"`

	// Kind of fix: patch, upgrade, config, workaround, mitigation, no_fix.
	SolutionType SolutionType `json:"solution_type,omitempty"`

	// When the vendor published the patch.
	PatchPublishedAt *time.Time `json:"patch_published_at,omitempty"`

	// Vendor advisories that address the finding.
	Advisories []Advisory `json:"advisories,omitempty"`
}

Remediation provides remediation guidance for a finding.

type RemediationContext

type RemediationContext struct {
	// Remediation type: patch, upgrade, workaround, config_change, mitigate, accept_risk
	Type string `json:"type,omitempty"`

	// Estimated time to fix in minutes
	EstimatedMinutes int `json:"estimated_minutes,omitempty"`

	// Fix complexity: simple, moderate, complex
	Complexity string `json:"complexity,omitempty"`

	// Is a remedy (patch/fix) available
	RemedyAvailable bool `json:"remedy_available,omitempty"`
}

RemediationContext contains CTEM remediation context for a finding.

type Report

type Report struct {
	// Schema version (required)
	Version string `json:"version"`

	// Schema URL for validation (optional)
	Schema string `json:"$schema,omitempty"`

	// Report metadata
	Metadata ReportMetadata `json:"metadata"`

	// Tool information (for collector/scanner reports)
	Tool *Tool `json:"tool,omitempty"`

	// Assets discovered/collected
	Assets []Asset `json:"assets,omitempty"`

	// Findings discovered
	Findings []Finding `json:"findings,omitempty"`

	// Dependencies (SBOM)
	Dependencies []Dependency `json:"dependencies,omitempty"`

	// Typed relationships between assets of this report (1.5). Optional:
	// a receiver may also derive relationships from technical members.
	Relationships []Relationship `json:"relationships,omitempty"`

	// Endpoints are the methods and paths web origins serve, as a tool
	// saw them (1.6). Names of parameters only, never values.
	Endpoints []Endpoint `json:"endpoints,omitempty"`

	// Custom properties
	Properties Properties `json:"properties,omitempty"`
}

Report is the root CTIS document containing assets and findings.

func ConvertReconToCTIS

func ConvertReconToCTIS(input *ReconToCTISInput, opts *ReconConverterOptions) (*Report, error)

ConvertReconToCTIS converts reconnaissance results to a CTIS Report.

The output validates against schemas/v1:

  • scope.type is domain for subdomain, dns, http_probe and url_crawl scans and network for port scans;
  • tool.capabilities uses the capability vocabulary (subdomain, dns, portscan, http_probe, crawler, easm);
  • DNS record types are upper-cased, each value is its own record, and record types outside the schema enum are kept in the asset's properties["other_dns_records"] instead;
  • a port-scan target is an ip_address asset only when it is an IP address; a hostname becomes a host asset;
  • every HTTP probe result is an http_service asset, whatever its status.

Asset IDs are unique within the report, and assets keep the input order.

func FromSARIF

func FromSARIF(data []byte, opts *ConvertOptions) (*Report, error)

FromSARIF converts a SARIF 2.1.0 log to a CTIS report.

Every run is converted. The report's tool is the first run's driver; when the log has more than one run, each finding names its run's tool in properties["sarif_tool"].

Mapping:

  • severity: the GitHub "security-severity" score (result, then rule) via severity.FromCVSS; else the result level, else the rule's default level; else medium (SARIF's default level is warning).
  • type: ConvertOptions.ToolType; else the rule's tags (vulnerability, misconfiguration, secret, as Trivy writes them); else a CVE/GHSA rule id means vulnerability; else the tool name.
  • CWE: rule properties "cwe" (string or array) and tags such as "external/cwe/cwe-079" (CodeQL) or "CWE-89: ..." (Semgrep).
  • fingerprint: the result's "fingerprints" entry with the lowest key, so the choice is deterministic; values over 64 characters are SHA-256 hashed. partialFingerprints are passed through unchanged as partial_fingerprints.
  • tags: properties.tags of the result, then of the rule, deduplicated ignoring case in first-seen order; at most 50, each at most 128 bytes.

The converter asserts no business context: the asset it creates has no criticality.

func MergeReconReports

func MergeReconReports(reports []*Report) *Report

MergeReconReports merges multiple CTIS reports from different recon scanners. This is useful when running a recon pipeline (subfinder -> dnsx -> naabu -> httpx).

Assets with the same value are merged into one (tags, properties, DNS records, nameservers and ports are combined; the first report's other fields win). Assets keep first-seen order and get report-unique IDs. The merged tool's capabilities are the union of the inputs' capabilities; the tool names are in properties["tools_used"]. The inputs are never modified, and the result is always a new report.

func NewReport

func NewReport() *Report

NewReport creates a new empty CTIS report stamped with the current specification version and the published schema URL.

func (*Report) Validate added in v1.1.0

func (r *Report) Validate() error

Validate checks a report's semantic invariants using only the standard library (CTIS is intentionally zero-external-dependency). Producers should call it before sending, and receivers at their ingest boundary, so a malformed or drifted report is refused rather than persisted.

It checks, beyond what decoding into the Go types already enforces:

  • version is MAJOR.MINOR with this module's major (IsCompatibleVersion);
  • metadata.timestamp is set;
  • tool.name is set when tool is present;
  • assets: value set, type and criticality in their enums, confidence 0-100, unique non-empty IDs;
  • findings: title set, type, severity and status in their enums, confidence 0-100, rank 0-100, unique non-empty IDs, and asset_ref naming an asset of this report;
  • vulnerability scores: cvss_score 0-10, epss_score 0-1, epss_percentile 0-1 (FIRST's fraction scale, not 0-100), vpr_score 0-10, none of them NaN or infinite;
  • the interoperability members (CTIS 1.4): enums, score ranges per system, VEX consistency, typed vulnerability ids, and the size limits of interop.go (scores, ids, advisories, source_extra, identity hints);
  • dependencies: name set, unique non-empty IDs;
  • the contract members (CTIS 1.5): metadata.capability is id@major, technologies and finding.attack within their limits and formats, relationships of a known type between two different assets of this report.

Validate reports all problems it finds (up to 100) in one error, joined with "; ". It does not modify the report and does no I/O.

type ReportMetadata

type ReportMetadata struct {
	// Unique identifier for this report/scan (recommended)
	ID string `json:"id,omitempty"`

	// Timestamp when the report was generated (required)
	Timestamp time.Time `json:"timestamp"`

	// Duration of the scan/collection in milliseconds (optional)
	DurationMs int `json:"duration_ms,omitempty"`

	// Source type: scanner, collector, integration, manual
	SourceType string `json:"source_type,omitempty"`

	// External reference (job ID, scan ID)
	SourceRef string `json:"source_ref,omitempty"`

	// Coverage type: full, incremental, partial
	// - full: Complete scan of entire scope (enables auto-resolve)
	// - incremental: Diff scan of changed files only (no auto-resolve)
	// - partial: Partial scan of specific directories (no auto-resolve)
	CoverageType string `json:"coverage_type,omitempty"`

	// Branch information for git-based scans
	// Used for branch-aware finding lifecycle management
	Branch *BranchInfo `json:"branch,omitempty"`

	// Target scope of the scan/collection
	Scope *Scope `json:"scope,omitempty"`

	// The capability this report answers, "scan.ports@1" (1.5). A
	// producer claim: a receiver that bound the report to a command uses
	// the command's capability and treats this as a hint.
	Capability string `json:"capability,omitempty"`

	// Custom properties
	Properties Properties `json:"properties,omitempty"`
}

ReportMetadata contains metadata about the report.

type RepositoryTechnical

type RepositoryTechnical struct {
	// SCM platform: github, gitlab, bitbucket
	Platform string `json:"platform,omitempty"`

	// Organization/owner
	Owner string `json:"owner,omitempty"`

	// Repository name
	Name string `json:"name,omitempty"`

	// Default branch
	DefaultBranch string `json:"default_branch,omitempty"`

	// Repository visibility: public, private, internal
	Visibility string `json:"visibility,omitempty"`

	// Repository URL
	URL string `json:"url,omitempty"`

	// Clone URL
	CloneURL string `json:"clone_url,omitempty"`

	// Language breakdown
	Languages map[string]int `json:"languages,omitempty"`

	// Stars count
	Stars int `json:"stars,omitempty"`

	// Forks count
	Forks int `json:"forks,omitempty"`

	// Last commit SHA
	LastCommitSHA string `json:"last_commit_sha,omitempty"`

	// Last commit date
	LastCommitAt *time.Time `json:"last_commit_at,omitempty"`
}

RepositoryTechnical contains repository-specific technical details.

type SARIFArtifact

type SARIFArtifact struct {
	Location SARIFArtifactLocation `json:"location"`
}

SARIFArtifact represents a scanned file.

type SARIFArtifactLocation

type SARIFArtifactLocation struct {
	URI       string `json:"uri"`
	URIBaseId string `json:"uriBaseId,omitempty"`
}

SARIFArtifactLocation contains file path.

type SARIFContent added in v1.6.0

type SARIFContent struct {
	Text   string `json:"text,omitempty"`
	Binary string `json:"binary,omitempty"`
}

SARIFContent is a SARIF artifactContent object: text, or base64 binary.

type SARIFDriver

type SARIFDriver struct {
	Name            string      `json:"name"`
	Version         string      `json:"version,omitempty"`
	SemanticVersion string      `json:"semanticVersion,omitempty"`
	InformationURI  string      `json:"informationUri,omitempty"`
	Rules           []SARIFRule `json:"rules,omitempty"`
}

SARIFDriver contains tool metadata.

type SARIFInvocation

type SARIFInvocation struct {
	ExecutionSuccessful bool   `json:"executionSuccessful"`
	CommandLine         string `json:"commandLine,omitempty"`
}

SARIFInvocation contains execution details.

type SARIFLocation

type SARIFLocation struct {
	PhysicalLocation *SARIFPhysicalLocation `json:"physicalLocation,omitempty"`
	LogicalLocations []SARIFLogicalLocation `json:"logicalLocations,omitempty"`
}

SARIFLocation represents a code location.

type SARIFLog

type SARIFLog struct {
	Version string     `json:"version"`
	Schema  string     `json:"$schema,omitempty"`
	Runs    []SARIFRun `json:"runs"`
}

SARIFLog is the root SARIF document.

type SARIFLogicalLocation added in v1.6.0

type SARIFLogicalLocation struct {
	Name               string `json:"name,omitempty"`
	FullyQualifiedName string `json:"fullyQualifiedName,omitempty"`
	Kind               string `json:"kind,omitempty"`
}

SARIFLogicalLocation names the function, method or class of a location.

type SARIFMessage

type SARIFMessage struct {
	Text string `json:"text"`
}

SARIFMessage holds text.

type SARIFPhysicalLocation

type SARIFPhysicalLocation struct {
	ArtifactLocation *SARIFArtifactLocation `json:"artifactLocation,omitempty"`
	Region           *SARIFRegion           `json:"region,omitempty"`
}

SARIFPhysicalLocation contains file/region info.

type SARIFRegion

type SARIFRegion struct {
	StartLine   int           `json:"startLine,omitempty"`
	EndLine     int           `json:"endLine,omitempty"`
	StartColumn int           `json:"startColumn,omitempty"`
	EndColumn   int           `json:"endColumn,omitempty"`
	Snippet     *SARIFSnippet `json:"snippet,omitempty"`
}

SARIFRegion contains line/column info.

type SARIFReportingReference added in v1.6.0

type SARIFReportingReference struct {
	ID    string `json:"id,omitempty"`
	Index *int   `json:"index,omitempty"`
}

SARIFReportingReference is a result's reference to its rule (SARIF reportingDescriptorReference).

type SARIFResult

type SARIFResult struct {
	RuleID string `json:"ruleId,omitempty"`
	// RuleIndex is the index of the rule in tool.driver.rules. Nil when the
	// result does not carry one (SARIF's default is -1, "absent").
	RuleIndex           *int                     `json:"ruleIndex,omitempty"`
	Rule                *SARIFReportingReference `json:"rule,omitempty"`
	Level               string                   `json:"level,omitempty"`
	Message             SARIFMessage             `json:"message"`
	Locations           []SARIFLocation          `json:"locations,omitempty"`
	Fingerprints        map[string]string        `json:"fingerprints,omitempty"`
	PartialFingerprints map[string]string        `json:"partialFingerprints,omitempty"`
	CorrelationGUID     string                   `json:"correlationGuid,omitempty"`
	BaselineState       string                   `json:"baselineState,omitempty"`
	// Kind is the evaluation state of the result: notApplicable, pass, fail,
	// review, open or informational (SARIF 2.1.0 section 3.27.9).
	Kind string `json:"kind,omitempty"`
	// Suppressions are the result's suppressions (SARIF 2.1.0 section
	// 3.27.23), e.g. a nosemgrep comment or a CodeQL alert suppression.
	Suppressions []SARIFSuppression `json:"suppressions,omitempty"`
	Properties   map[string]any     `json:"properties,omitempty"`
	// WebRequest and WebResponse are the HTTP exchange of a web result
	// (SARIF 2.1.0 sections 3.46 and 3.47).
	WebRequest  *SARIFWebRequest  `json:"webRequest,omitempty"`
	WebResponse *SARIFWebResponse `json:"webResponse,omitempty"`
}

SARIFResult represents a finding.

type SARIFRule

type SARIFRule struct {
	ID                   string           `json:"id"`
	Name                 string           `json:"name,omitempty"`
	ShortDescription     *SARIFMessage    `json:"shortDescription,omitempty"`
	FullDescription      *SARIFMessage    `json:"fullDescription,omitempty"`
	HelpURI              string           `json:"helpUri,omitempty"`
	Help                 *SARIFMessage    `json:"help,omitempty"`
	DefaultConfiguration *SARIFRuleConfig `json:"defaultConfiguration,omitempty"`
	Properties           map[string]any   `json:"properties,omitempty"`
}

SARIFRule describes a rule/check.

type SARIFRuleConfig

type SARIFRuleConfig struct {
	Level string `json:"level,omitempty"`
}

SARIFRuleConfig holds rule configuration.

type SARIFRun

type SARIFRun struct {
	Tool        SARIFTool         `json:"tool"`
	Results     []SARIFResult     `json:"results"`
	Artifacts   []SARIFArtifact   `json:"artifacts,omitempty"`
	Invocations []SARIFInvocation `json:"invocations,omitempty"`
}

SARIFRun represents a single run of a tool.

type SARIFSnippet

type SARIFSnippet struct {
	Text string `json:"text"`
}

SARIFSnippet contains code snippet.

type SARIFSuppression added in v1.6.0

type SARIFSuppression struct {
	// Kind is inSource or external.
	Kind string `json:"kind,omitempty"`
	// Status is accepted (the default when absent), underReview or rejected.
	Status        string `json:"status,omitempty"`
	Justification string `json:"justification,omitempty"`
}

SARIFSuppression is one SARIF suppression object (section 3.35).

type SARIFTool

type SARIFTool struct {
	Driver SARIFDriver `json:"driver"`
}

SARIFTool describes the tool.

type SARIFWebRequest added in v1.6.0

type SARIFWebRequest struct {
	Protocol string            `json:"protocol,omitempty"`
	Version  string            `json:"version,omitempty"`
	Target   string            `json:"target,omitempty"`
	Method   string            `json:"method,omitempty"`
	Headers  map[string]string `json:"headers,omitempty"`
	Body     *SARIFContent     `json:"body,omitempty"`
}

SARIFWebRequest is a SARIF webRequest object (section 3.46).

type SARIFWebResponse added in v1.6.0

type SARIFWebResponse struct {
	Protocol           string            `json:"protocol,omitempty"`
	Version            string            `json:"version,omitempty"`
	StatusCode         int               `json:"statusCode,omitempty"`
	ReasonPhrase       string            `json:"reasonPhrase,omitempty"`
	Headers            map[string]string `json:"headers,omitempty"`
	Body               *SARIFContent     `json:"body,omitempty"`
	NoResponseReceived bool              `json:"noResponseReceived,omitempty"`
}

SARIFWebResponse is a SARIF webResponse object (section 3.47).

type Scope

type Scope struct {
	// Scope name or identifier
	Name string `json:"name,omitempty"`

	// Scope type: domain, network, repository, cloud_account
	Type string `json:"type,omitempty"`

	// Included targets
	Includes []string `json:"includes,omitempty"`

	// Excluded targets
	Excludes []string `json:"excludes,omitempty"`
}

Scope defines the target scope of the scan/collection.

type Score added in v1.6.0

type Score struct {
	// Scoring system (required).
	System ScoreSystem `json:"system"`

	// System version: "2.0", "3.0", "3.1" or "4.0" for CVSS (required
	// there), the model version for EPSS, "2" for SSVC.
	Version string `json:"version,omitempty"`

	// Vector string ("CVSS:3.1/AV:N/...", an SSVC vector).
	Vector string `json:"vector,omitempty"`

	// Numeric value: 0-10 for cvss and vpr, 0-1 for epss and
	// epss_percentile (FIRST's fractions), absent for ssvc.
	Value *float64 `json:"value,omitempty"`

	// Qualitative rating as the source states it ("high", "Act").
	Label string `json:"label,omitempty"`

	// Who assigned it: nvd, ghsa, vendor, tenable, qualys, first, cisa, ...
	Source string `json:"source,omitempty"`

	// When the source assigned or last updated it.
	AsOf *time.Time `json:"as_of,omitempty"`
}

Score is one score of a finding, with where it came from and when. A finding may carry several: CVSS v3.1 and v4.0 together, a vendor's rating, EPSS and an SSVC decision.

func AllScores added in v1.6.0

func AllScores(f *Finding) []Score

AllScores returns every score of a finding: its scores member followed by the single-valued members of the vulnerability block (cvss_*, epss_*, vpr_score) expressed as scores, so a receiver can show and store one list whatever version of CTIS the producer wrote. A legacy score is left out when scores already holds one of the same system, version and source.

type ScoreSystem added in v1.6.0

type ScoreSystem string

ScoreSystem names a scoring system.

const (
	ScoreSystemCVSS           ScoreSystem = "cvss"
	ScoreSystemEPSS           ScoreSystem = "epss"
	ScoreSystemEPSSPercentile ScoreSystem = "epss_percentile"
	ScoreSystemSSVC           ScoreSystem = "ssvc"
	// Tenable Vulnerability Priority Rating, 0-10.
	ScoreSystemVPR ScoreSystem = "vpr"
	// Any other vendor score (a Qualys detection score, a risk score);
	// source names the vendor.
	ScoreSystemVendor ScoreSystem = "vendor"
)

func AllScoreSystems added in v1.6.0

func AllScoreSystems() []ScoreSystem

AllScoreSystems returns every valid score system.

func (ScoreSystem) IsValid added in v1.6.0

func (s ScoreSystem) IsValid() bool

IsValid reports whether s is a recognized score system.

type SecretDetails

type SecretDetails struct {
	// Secret type: api_key, password, token, certificate, private_key, etc.
	SecretType string `json:"secret_type,omitempty"`

	// Service associated with the secret: aws, github, stripe, gcp, azure, etc.
	Service string `json:"service,omitempty"`

	// Masked value (first and last few chars)
	MaskedValue string `json:"masked_value,omitempty"`

	// Length of the secret
	Length int `json:"length,omitempty"`

	// Entropy score
	Entropy float64 `json:"entropy,omitempty"`

	// Is valid (if verification was performed)
	Valid *bool `json:"valid,omitempty"`

	// Verification timestamp
	VerifiedAt *time.Time `json:"verified_at,omitempty"`

	// Is revoked
	Revoked bool `json:"revoked,omitempty"`

	// When the secret was revoked
	RevokedAt *time.Time `json:"revoked_at,omitempty"`

	// Secret scope/permissions (e.g., "read:org", "repo", "admin")
	Scopes []string `json:"scopes,omitempty"`

	// Expiration date (if known)
	ExpiresAt *time.Time `json:"expires_at,omitempty"`

	// Secret age (how long since creation, if known)
	AgeInDays int `json:"age_in_days,omitempty"`

	// Rotation recommended by date
	RotationDueAt *time.Time `json:"rotation_due_at,omitempty"`

	// Is the secret in git history only (not in current HEAD)
	InHistoryOnly bool `json:"in_history_only,omitempty"`

	// Commit count where this secret appears
	CommitCount int `json:"commit_count,omitempty"`
}

SecretDetails contains secret-specific details.

type SensitiveSpan added in v1.6.0

type SensitiveSpan struct {
	Pointer string `json:"pointer"`
	Start   *int   `json:"start,omitempty"`
	End     *int   `json:"end,omitempty"`
	Kind    string `json:"kind,omitempty"`
}

SensitiveSpan marks a secret or personal value inside the item: the string at Pointer (a JSON pointer into the item), whole or the byte range [Start, End).

type ServiceInfo

type ServiceInfo struct {
	// Port number
	Port int `json:"port"`

	// Transport protocol: tcp, udp
	Protocol string `json:"protocol,omitempty"`

	// Service type: http, https, ssh, ftp, mysql, postgresql, etc.
	ServiceType string `json:"service_type,omitempty"`

	// Product name: Apache, nginx, OpenSSH, etc.
	Product string `json:"product,omitempty"`

	// Product version
	Version string `json:"version,omitempty"`

	// Service banner
	Banner string `json:"banner,omitempty"`

	// Common Platform Enumeration identifier
	CPE string `json:"cpe,omitempty"`

	// Is this service publicly accessible from the internet
	IsPublic bool `json:"is_public,omitempty"`

	// TLS enabled
	TLSEnabled bool `json:"tls_enabled,omitempty"`

	// TLS version: TLS 1.2, TLS 1.3
	TLSVersion string `json:"tls_version,omitempty"`

	// Service state: active, inactive, filtered
	State string `json:"state,omitempty"`
}

ServiceInfo represents a network service discovered on an asset.

type ServiceTechnical

type ServiceTechnical struct {
	// Service name
	Name string `json:"name,omitempty"`

	// Service version
	Version string `json:"version,omitempty"`

	// Port
	Port int `json:"port,omitempty"`

	// Protocol (application-layer): http, https, ssh, smtp, ftp, dns, ldap, smb, rdp, mysql, postgresql, mongodb, redis, etc.
	Protocol string `json:"protocol,omitempty"`

	// Transport: tcp, udp
	Transport string `json:"transport,omitempty"`

	// SSL/TLS enabled
	TLS bool `json:"tls,omitempty"`

	// TLS version: tls1.0, tls1.1, tls1.2, tls1.3
	TLSVersion string `json:"tls_version,omitempty"`

	// TLS certificate info (for services with TLS)
	TLSCertSubject string `json:"tls_cert_subject,omitempty"`
	TLSCertIssuer  string `json:"tls_cert_issuer,omitempty"`
	TLSCertExpiry  string `json:"tls_cert_expiry,omitempty"`

	// Banner/fingerprint
	Banner string `json:"banner,omitempty"`

	// Product name (e.g., "OpenSSH", "nginx", "Apache", "Postfix")
	Product string `json:"product,omitempty"`

	// CPE (Common Platform Enumeration) identifier
	CPE string `json:"cpe,omitempty"`

	// Extra info
	ExtraInfo string `json:"extra_info,omitempty"`

	// Service state: open, filtered, closed
	State string `json:"state,omitempty"`

	// Authentication required
	AuthRequired bool `json:"auth_required,omitempty"`

	// Authentication methods supported (e.g., ["password", "publickey"] for SSH)
	AuthMethods []string `json:"auth_methods,omitempty"`

	// Default credentials detected
	DefaultCredentials bool `json:"default_credentials,omitempty"`

	// Anonymous access allowed (for FTP, SMB, etc.)
	AnonymousAccess bool `json:"anonymous_access,omitempty"`

	// Response time in milliseconds
	ResponseTimeMs int `json:"response_time_ms,omitempty"`

	// Last seen timestamp
	LastSeen string `json:"last_seen,omitempty"`

	// Service-specific details (protocol-dependent)
	// For HTTP: methods, headers, etc.
	// For SMTP: EHLO response, supported extensions
	// For SSH: supported algorithms, host keys
	Details map[string]any `json:"details,omitempty"`
}

ServiceTechnical contains service-specific technical details.

type Severity

type Severity string

Severity represents the severity level.

const (
	SeverityCritical Severity = "critical"
	SeverityHigh     Severity = "high"
	SeverityMedium   Severity = "medium"
	SeverityLow      Severity = "low"
	SeverityInfo     Severity = "info"
)

func AllSeverities

func AllSeverities() []Severity

AllSeverities returns all valid severities.

func NormalizeNativeSeverity added in v1.6.0

func NormalizeNativeSeverity(scheme NativeScheme, native string) (Severity, bool)

NormalizeNativeSeverity maps a native severity of the given scheme to a CTIS severity. Unknown schemes and values return ok=false.

func (Severity) IsValid

func (s Severity) IsValid() bool

IsValid checks if the severity is valid.

func (Severity) Score

func (s Severity) Score() float64

Score returns a numeric score for the severity (0-10).

An unrecognized/empty severity intentionally scores 5.0 (Medium), NOT 0. This is a fail-safe for a security tool: a finding whose severity string the producer got wrong (enum drift, typo) must still SURFACE in score-based triage rather than silently sink to the bottom and be missed. Callers that want to reject unknown severities outright should use Report.Validate / Severity.IsValid instead of relying on the score. Do not change this default to 0 without that explicit reject path — it would hide findings.

func (Severity) String

func (s Severity) String() string

String returns the string representation.

type SmartContractDetails

type SmartContractDetails struct {
	// Contract name
	Name string `json:"name,omitempty"`

	// Contract address
	Address string `json:"address,omitempty"`

	// Deployer address
	DeployerAddress string `json:"deployer_address,omitempty"`

	// Deployment transaction hash
	DeploymentTxHash string `json:"deployment_tx_hash,omitempty"`

	// Deployment block number
	DeploymentBlock int64 `json:"deployment_block,omitempty"`

	// Deployment timestamp
	DeployedAt *time.Time `json:"deployed_at,omitempty"`

	// Is verified on explorer (etherscan, etc.)
	Verified bool `json:"verified,omitempty"`

	// Compiler version
	CompilerVersion string `json:"compiler_version,omitempty"`

	// EVM version
	EVMVersion string `json:"evm_version,omitempty"`

	// Optimization enabled
	OptimizationEnabled bool `json:"optimization_enabled,omitempty"`

	// Optimization runs
	OptimizationRuns int `json:"optimization_runs,omitempty"`

	// Contract type: erc20, erc721, erc1155, proxy, multisig, defi, custom
	ContractType string `json:"contract_type,omitempty"`

	// Is proxy contract
	IsProxy bool `json:"is_proxy,omitempty"`

	// Implementation address (for proxy contracts)
	ImplementationAddress string `json:"implementation_address,omitempty"`

	// Proxy type: transparent, uups, beacon, diamond
	ProxyType string `json:"proxy_type,omitempty"`

	// Is upgradeable
	IsUpgradeable bool `json:"is_upgradeable,omitempty"`

	// Owner/admin address
	OwnerAddress string `json:"owner_address,omitempty"`

	// Has renounced ownership
	OwnershipRenounced bool `json:"ownership_renounced,omitempty"`

	// Source code URL (GitHub, etc.)
	SourceCodeURL string `json:"source_code_url,omitempty"`

	// ABI (JSON string or base64 encoded)
	ABI string `json:"abi,omitempty"`

	// Bytecode hash (keccak256)
	BytecodeHash string `json:"bytecode_hash,omitempty"`

	// Source code hash
	SourceCodeHash string `json:"source_code_hash,omitempty"`

	// License type: MIT, GPL, UNLICENSED, etc.
	License string `json:"license,omitempty"`

	// External libraries used
	Libraries []ContractLibrary `json:"libraries,omitempty"`

	// Implemented interfaces: ERC20, ERC721, etc.
	Interfaces []string `json:"interfaces,omitempty"`

	// Contract balance (in wei)
	Balance string `json:"balance,omitempty"`

	// Total transactions
	TxCount int64 `json:"tx_count,omitempty"`
}

SmartContractDetails contains smart contract-specific details.

type SolutionType added in v1.6.0

type SolutionType string

SolutionType is the kind of fix a remediation is.

const (
	SolutionTypePatch      SolutionType = "patch"
	SolutionTypeUpgrade    SolutionType = "upgrade"
	SolutionTypeConfig     SolutionType = "config"
	SolutionTypeWorkaround SolutionType = "workaround"
	SolutionTypeMitigation SolutionType = "mitigation"
	SolutionTypeNoFix      SolutionType = "no_fix"
)

func AllSolutionTypes added in v1.6.0

func AllSolutionTypes() []SolutionType

AllSolutionTypes returns every valid solution type.

func (SolutionType) IsValid added in v1.6.0

func (s SolutionType) IsValid() bool

IsValid reports whether s is a recognized solution type.

type SourceLifecycle added in v1.6.0

type SourceLifecycle struct {
	// When the source first found it.
	FirstFound *time.Time `json:"first_found,omitempty"`

	// When the source last found it.
	LastFound *time.Time `json:"last_found,omitempty"`

	// When the source last saw it fixed.
	LastFixed *time.Time `json:"last_fixed,omitempty"`

	// How many times the source has found it.
	TimesFound int `json:"times_found,omitempty"`

	// The source state, normalized (native.status keeps the source's word).
	State SourceState `json:"state,omitempty"`
}

SourceLifecycle is the finding's history as the source tracks it. It is the source's view and stays separate from the receiver's own lifecycle: a scanner may call a finding fixed that a receiver keeps open until verified.

type SourceState added in v1.6.0

type SourceState string

SourceState is the normalized state of a finding in its source.

const (
	SourceStateNew      SourceState = "new"
	SourceStateActive   SourceState = "active"
	SourceStateReopened SourceState = "reopened"
	SourceStateFixed    SourceState = "fixed"
)

func AllSourceStates added in v1.6.0

func AllSourceStates() []SourceState

AllSourceStates returns every valid source state.

func (SourceState) IsValid added in v1.6.0

func (s SourceState) IsValid() bool

IsValid reports whether s is a recognized source state.

type StackFrame

type StackFrame struct {
	// Location of this frame
	Location *FindingLocation `json:"location,omitempty"`

	// Module/library name
	Module string `json:"module,omitempty"`

	// Thread ID
	ThreadID int `json:"thread_id,omitempty"`

	// Function parameters
	Parameters []string `json:"parameters,omitempty"`
}

StackFrame represents a single frame in a call stack.

type StackTrace

type StackTrace struct {
	// Stack description/message
	Message string `json:"message,omitempty"`

	// Stack frames from innermost to outermost
	Frames []*StackFrame `json:"frames,omitempty"`
}

StackTrace represents a call stack trace (SARIF stack).

type SubdomainInput

type SubdomainInput struct {
	Host   string
	Domain string
	Source string
	IPs    []string
}

SubdomainInput represents a discovered subdomain.

type Suppression

type Suppression struct {
	// Suppression kind: in_source, external
	Kind string `json:"kind,omitempty"`

	// Suppression status: accepted, under_review, rejected
	Status string `json:"status,omitempty"`

	// Short reason code or phrase, e.g. "false_positive", "test_code",
	// "risk_accepted".
	Reason string `json:"reason,omitempty"`

	// Justification for suppression
	Justification string `json:"justification,omitempty"`

	// Who suppressed the finding
	SuppressedBy string `json:"suppressed_by,omitempty"`

	// When the finding was suppressed
	SuppressedAt *time.Time `json:"suppressed_at,omitempty"`

	// When the suppression stops applying. Empty means it does not expire.
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
}

Suppression contains information about finding suppression.

type TLSLeafInput added in v1.6.0

type TLSLeafInput struct {
	SubjectCN    string
	SANs         []string
	IssuerCN     string
	IssuerOrg    string
	SerialNumber string
	NotBefore    time.Time
	NotAfter     time.Time
	// FingerprintSHA256 is the SHA-256 of the DER certificate, hex, with or
	// without colons. It is the certificate's identity: a leaf without a
	// valid one is not converted.
	FingerprintSHA256 string
	SelfSigned        bool
	Expired           bool
	Wildcard          bool
	Mismatched        bool
}

TLSLeafInput is the leaf certificate an HTTP probe saw in a TLS handshake. Every value comes from the scanned server and is bounded by the converter.

type Technology added in v1.6.0

type Technology struct {
	// Name of the product or framework ("nginx", "WordPress").
	Name string `json:"name"`

	// Version when the tool could tell.
	Version string `json:"version,omitempty"`

	// CPE 2.3 name when the tool could tell.
	CPE string `json:"cpe,omitempty"`

	// Categories the tool puts the technology in ("web-server", "cms").
	Categories []string `json:"categories,omitempty"`

	// How sure the tool is, 0-100.
	Confidence int `json:"confidence,omitempty"`
}

Technology is a technology an asset runs, as a fingerprinting tool identified it.

type TechnologyInput

type TechnologyInput struct {
	Name       string
	Version    string
	Categories []string
	Confidence int
	Website    string
}

TechnologyInput represents a detected technology.

type TokenBalance

type TokenBalance struct {
	// Token contract address
	ContractAddress string `json:"contract_address"`

	// Token symbol
	Symbol string `json:"symbol,omitempty"`

	// Token name
	Name string `json:"name,omitempty"`

	// Token decimals
	Decimals int `json:"decimals,omitempty"`

	// Balance (raw value)
	Balance string `json:"balance"`

	// Balance formatted (human readable)
	BalanceFormatted string `json:"balance_formatted,omitempty"`

	// USD value
	USDValue float64 `json:"usd_value,omitempty"`
}

TokenBalance represents a token balance for a wallet.

type TokenDetails

type TokenDetails struct {
	// Token standard: erc20, erc721, erc1155, bep20, spl
	Standard string `json:"standard,omitempty"`

	// Token symbol
	Symbol string `json:"symbol,omitempty"`

	// Token name
	Name string `json:"name,omitempty"`

	// Token decimals
	Decimals int `json:"decimals,omitempty"`

	// Total supply (raw value)
	TotalSupply string `json:"total_supply,omitempty"`

	// Max supply (if applicable)
	MaxSupply string `json:"max_supply,omitempty"`

	// Is mintable
	Mintable bool `json:"mintable,omitempty"`

	// Is burnable
	Burnable bool `json:"burnable,omitempty"`

	// Is pausable
	Pausable bool `json:"pausable,omitempty"`

	// Has blacklist/whitelist
	HasBlacklist bool `json:"has_blacklist,omitempty"`

	// Has transfer fee/tax
	HasTransferFee bool `json:"has_transfer_fee,omitempty"`

	// Transfer fee percentage
	TransferFeePercent float64 `json:"transfer_fee_percent,omitempty"`

	// Holder count
	HolderCount int64 `json:"holder_count,omitempty"`

	// Market cap USD
	MarketCapUSD float64 `json:"market_cap_usd,omitempty"`

	// Price USD
	PriceUSD float64 `json:"price_usd,omitempty"`

	// Liquidity USD
	LiquidityUSD float64 `json:"liquidity_usd,omitempty"`

	// Trading pairs
	TradingPairs []TradingPair `json:"trading_pairs,omitempty"`

	// Is honeypot
	IsHoneypot bool `json:"is_honeypot,omitempty"`

	// Honeypot reason
	HoneypotReason string `json:"honeypot_reason,omitempty"`
}

TokenDetails contains token-specific details (ERC-20, etc.).

type Tool

type Tool struct {
	// Tool name (required)
	Name string `json:"name"`

	// Tool version (recommended)
	Version string `json:"version,omitempty"`

	// Tool vendor/organization
	Vendor string `json:"vendor,omitempty"`

	// Tool information URL
	InfoURL string `json:"info_url,omitempty"`

	// Tool capabilities
	Capabilities []string `json:"capabilities,omitempty"`

	// Custom properties
	Properties Properties `json:"properties,omitempty"`
}

Tool describes the tool that generated this report.

type TradingPair

type TradingPair struct {
	// DEX name: uniswap, sushiswap, pancakeswap, etc.
	DEX string `json:"dex"`

	// Pair address
	PairAddress string `json:"pair_address"`

	// Quote token symbol (WETH, USDT, etc.)
	QuoteToken string `json:"quote_token"`

	// Liquidity USD
	LiquidityUSD float64 `json:"liquidity_usd,omitempty"`
}

TradingPair represents a trading pair for a token.

type VEX added in v1.6.0

type VEX struct {
	// Status (required).
	Status VEXStatus `json:"status"`

	// Why the product is not affected. Only with status not_affected, which
	// needs a justification or a statement.
	Justification VEXJustification `json:"justification,omitempty"`

	// The justification as the source document states it (a CycloneDX
	// analysis.justification such as code_not_reachable).
	NativeJustification string `json:"native_justification,omitempty"`

	// Impact or action statement, plain text.
	Statement string `json:"statement,omitempty"`

	// Who made the statement: a document id or URL, a vendor, a team.
	Source string `json:"source,omitempty"`

	// When the statement was made.
	AsOf *time.Time `json:"as_of,omitempty"`
}

VEX is an exploitability statement about the vulnerability of a finding, in the CSAF / OpenVEX vocabulary.

type VEXJustification added in v1.6.0

type VEXJustification string

VEXJustification is why a product is not affected (CSAF flags, OpenVEX justifications).

const (
	VEXJustificationComponentNotPresent                         VEXJustification = "component_not_present"
	VEXJustificationVulnerableCodeNotPresent                    VEXJustification = "vulnerable_code_not_present"
	VEXJustificationVulnerableCodeNotInExecutePath              VEXJustification = "vulnerable_code_not_in_execute_path"
	VEXJustificationVulnerableCodeCannotBeControlledByAdversary VEXJustification = "vulnerable_code_cannot_be_controlled_by_adversary"
	VEXJustificationInlineMitigationsAlreadyExist               VEXJustification = "inline_mitigations_already_exist"
)

func AllVEXJustifications added in v1.6.0

func AllVEXJustifications() []VEXJustification

AllVEXJustifications returns every valid VEX justification.

func NormalizeVEXJustification added in v1.6.0

func NormalizeVEXJustification(native string) (VEXJustification, bool)

NormalizeVEXJustification maps a not-affected justification from CSAF flags, OpenVEX or CycloneDX (analysis.justification) to a VEXJustification. The CycloneDX values map to the nearest CSAF/OpenVEX value; keep the source word in VEX.NativeJustification.

func (VEXJustification) IsValid added in v1.6.0

func (j VEXJustification) IsValid() bool

IsValid reports whether j is a recognized VEX justification.

type VEXStatus added in v1.6.0

type VEXStatus string

VEXStatus is the exploitability status of a VEX statement.

const (
	VEXStatusNotAffected        VEXStatus = "not_affected"
	VEXStatusAffected           VEXStatus = "affected"
	VEXStatusFixed              VEXStatus = "fixed"
	VEXStatusUnderInvestigation VEXStatus = "under_investigation"
)

func AllVEXStatuses added in v1.6.0

func AllVEXStatuses() []VEXStatus

AllVEXStatuses returns every valid VEX status.

func NormalizeVEXStatus added in v1.6.0

func NormalizeVEXStatus(native string) (VEXStatus, bool)

NormalizeVEXStatus maps a VEX status from CSAF (product_status groups), OpenVEX or CycloneDX (analysis.state) to a VEXStatus. A CycloneDX false_positive is a disposition of the finding, not an exploitability statement, and is not mapped.

func (VEXStatus) IsValid added in v1.6.0

func (s VEXStatus) IsValid() bool

IsValid reports whether s is a recognized VEX status.

type VulnDataSource

type VulnDataSource struct {
	// Data source ID (e.g., "nvd", "ghsa", "osv")
	ID string `json:"id,omitempty"`

	// Data source name
	Name string `json:"name,omitempty"`

	// Data source URL
	URL string `json:"url,omitempty"`
}

VulnDataSource contains information about the vulnerability data source.

type VulnerabilityDetails

type VulnerabilityDetails struct {
	// CVE ID (primary, for single-CVE findings and backward compatibility)
	CVEID string `json:"cve_id,omitempty"`

	// CVE IDs (a finding may map to multiple CVEs — common for network
	// vulnerability scanners like Nessus/Tenable that group CVEs per plugin).
	CVEIDs []string `json:"cve_ids,omitempty"`

	// CWE IDs (can have multiple)
	CWEIDs []string `json:"cwe_ids,omitempty"`

	// CWE ID (single, for backward compatibility)
	CWEID string `json:"cwe_id,omitempty"`

	// OWASP IDs (e.g., "A01:2021", "A03:2021")
	OWASPIDs []string `json:"owasp_ids,omitempty"`

	// ASVS (Application Security Verification Standard) compliance info
	ASVS *ASVSInfo `json:"asvs,omitempty"`

	// CVSS version (2.0, 3.0, 3.1, 4.0)
	CVSSVersion string `json:"cvss_version,omitempty"`

	// CVSS score
	CVSSScore float64 `json:"cvss_score,omitempty"`

	// CVSS vector
	CVSSVector string `json:"cvss_vector,omitempty"`

	// CVSS data source: nvd, ghsa, redhat, bitnami
	CVSSSource string `json:"cvss_source,omitempty"`

	// Affected package
	Package string `json:"package,omitempty"`

	// Package URL (PURL spec) e.g., pkg:npm/lodash@4.17.20
	PURL string `json:"purl,omitempty"`

	// Affected version
	AffectedVersion string `json:"affected_version,omitempty"`

	// Affected version range (semver format)
	AffectedVersionRange string `json:"affected_version_range,omitempty"`

	// Fixed version
	FixedVersion string `json:"fixed_version,omitempty"`

	// All available fixed versions
	FixedVersions []string `json:"fixed_versions,omitempty"`

	// Ecosystem: npm, pip, maven, cargo, go, nuget, etc.
	Ecosystem string `json:"ecosystem,omitempty"`

	// Vulnerability published date
	PublishedAt *time.Time `json:"published_at,omitempty"`

	// Last modified date
	ModifiedAt *time.Time `json:"modified_at,omitempty"`

	// Exploit available
	ExploitAvailable bool `json:"exploit_available,omitempty"`

	// Exploit maturity: none, poc, functional, weaponized
	ExploitMaturity string `json:"exploit_maturity,omitempty"`

	// In CISA KEV (Known Exploited Vulnerabilities)
	InCISAKEV bool `json:"in_cisa_kev,omitempty"`

	// EPSS score (Exploit Prediction Scoring System)
	EPSSScore float64 `json:"epss_score,omitempty"`

	// EPSS percentile
	EPSSPercentile float64 `json:"epss_percentile,omitempty"`

	// VPR (Tenable Vulnerability Priority Rating), 0.0–10.0. Tenable's own
	// dynamic priority score, distinct from CVSS/EPSS; carried through so
	// prioritisation can use the source scanner's rating when present.
	VPRScore float64 `json:"vpr_score,omitempty"`

	// Affected CPE
	CPE string `json:"cpe,omitempty"`

	// Advisory URLs
	Advisories []string `json:"advisories,omitempty"`

	// Is direct dependency (vs transitive)
	IsDirect bool `json:"is_direct,omitempty"`

	// Dependency path for transitive vulnerabilities
	DependencyPath []string `json:"dependency_path,omitempty"`

	// Data source information (vulnerability database)
	DataSource *VulnDataSource `json:"data_source,omitempty"`

	// Severity source (who assigned the severity: nvd, ghsa, redhat, etc.)
	SeveritySource string `json:"severity_source,omitempty"`

	// Vendor-specific severity mapping (vendor -> severity level 1-5)
	VendorSeverity map[string]int `json:"vendor_severity,omitempty"`

	// Container layer information (for image scans)
	Layer *ContainerLayer `json:"layer,omitempty"`

	// Aqua Vulnerability Database ID (e.g., AVD-AWS-0001)
	AVDID string `json:"avd_id,omitempty"`

	// Vulnerability status: affected, fixed, under_investigation, will_not_fix
	VulnStatus string `json:"vuln_status,omitempty"`

	// Every id of the vulnerability with its namespace (CVE, GHSA, OSV,
	// vendor). cve_id and cve_ids stay as they are; producers that send
	// both keep them consistent.
	IDs []VulnerabilityID `json:"ids,omitempty"`
}

VulnerabilityDetails contains vulnerability-specific details.

type VulnerabilityID added in v1.6.0

type VulnerabilityID struct {
	// Namespace (required).
	Type VulnerabilityIDType `json:"type"`

	// The identifier (required): CVE-2024-3094, GHSA-xxxx-xxxx-xxxx,
	// PYSEC-2021-1, RHSA-2024:1234.
	ID string `json:"id"`

	// Issuer of a vendor id (redhat, microsoft, ubuntu, ...).
	Source string `json:"source,omitempty"`
}

VulnerabilityID is one identifier of a vulnerability, with its namespace. One vulnerability often has several (a CVE, a GHSA and an OSV id); receivers deduplicate on any shared id.

func NormalizeVulnerabilityID added in v1.6.0

func NormalizeVulnerabilityID(raw string) (VulnerabilityID, bool)

NormalizeVulnerabilityID recognizes a vulnerability id and returns it in canonical form with its type: CVE ids upper-case, GHSA ids as "GHSA-" plus the lower-case body, OSV database ids with an upper-case prefix, anything else as a vendor id. Empty, over-long and malformed ids (whitespace, control characters) return ok=false.

func PreferredVulnerabilityID added in v1.6.0

func PreferredVulnerabilityID(v *VulnerabilityDetails) (VulnerabilityID, bool)

PreferredVulnerabilityID picks the one id receivers key on, so two tools that name the same vulnerability differently agree: the lexically smallest CVE, else the first GHSA, else the first OSV id, else the first vendor id.

func VulnerabilityIDs added in v1.6.0

func VulnerabilityIDs(v *VulnerabilityDetails) []VulnerabilityID

VulnerabilityIDs returns every id of a vulnerability, canonical and without duplicates: cve_id, then cve_ids, then ids, in that order, at most MaxVulnerabilityIDs. Invalid entries (and non-CVE values in cve_id or cve_ids) are skipped.

type VulnerabilityIDType added in v1.6.0

type VulnerabilityIDType string

VulnerabilityIDType is the namespace of a vulnerability id.

const (
	VulnerabilityIDCVE    VulnerabilityIDType = "cve"
	VulnerabilityIDGHSA   VulnerabilityIDType = "ghsa"
	VulnerabilityIDOSV    VulnerabilityIDType = "osv"
	VulnerabilityIDVendor VulnerabilityIDType = "vendor"
)

func AllVulnerabilityIDTypes added in v1.6.0

func AllVulnerabilityIDTypes() []VulnerabilityIDType

AllVulnerabilityIDTypes returns every valid vulnerability id type.

func (VulnerabilityIDType) IsValid added in v1.6.0

func (t VulnerabilityIDType) IsValid() bool

IsValid reports whether t is a recognized vulnerability id type.

type WalletDetails

type WalletDetails struct {
	// Wallet type: eoa, multisig, smart_wallet, mpc
	WalletType string `json:"wallet_type,omitempty"`

	// For multisig: required signatures
	RequiredSignatures int `json:"required_signatures,omitempty"`

	// For multisig: total owners
	TotalOwners int `json:"total_owners,omitempty"`

	// Owner addresses (for multisig)
	Owners []string `json:"owners,omitempty"`

	// Wallet provider: metamask, ledger, safe, argent, etc.
	Provider string `json:"provider,omitempty"`

	// Balance (native token, in wei)
	Balance string `json:"balance,omitempty"`

	// Token balances
	TokenBalances []TokenBalance `json:"token_balances,omitempty"`

	// NFT count
	NFTCount int `json:"nft_count,omitempty"`

	// First transaction timestamp
	FirstTxAt *time.Time `json:"first_tx_at,omitempty"`

	// Last transaction timestamp
	LastTxAt *time.Time `json:"last_tx_at,omitempty"`

	// Total transactions
	TxCount int64 `json:"tx_count,omitempty"`

	// ENS name (if applicable)
	ENSName string `json:"ens_name,omitempty"`

	// Labels (exchange, whale, hacker, etc.)
	Labels []string `json:"labels,omitempty"`
}

WalletDetails contains wallet-specific details.

type Web3POC

type Web3POC struct {
	// POC type: transaction, script, foundry_test, hardhat_test
	Type string `json:"type,omitempty"`

	// POC code or script
	Code string `json:"code,omitempty"`

	// POC transaction data
	TxData string `json:"tx_data,omitempty"`

	// Expected outcome
	ExpectedOutcome string `json:"expected_outcome,omitempty"`

	// Tested on: mainnet_fork, testnet, local
	TestedOn string `json:"tested_on,omitempty"`

	// Fork block number (for mainnet fork tests)
	ForkBlockNumber int64 `json:"fork_block_number,omitempty"`
}

Web3POC contains proof of concept details for Web3 vulnerabilities.

type Web3Technical

type Web3Technical struct {
	// Blockchain network: ethereum, polygon, bsc, arbitrum, optimism, avalanche, solana, etc.
	Chain string `json:"chain,omitempty"`

	// Chain ID (EVM chains): 1 (mainnet), 137 (polygon), 56 (bsc), etc.
	ChainID int64 `json:"chain_id,omitempty"`

	// Network type: mainnet, testnet, devnet
	NetworkType string `json:"network_type,omitempty"`

	// Contract/wallet address
	Address string `json:"address,omitempty"`

	// For smart contracts
	Contract *SmartContractDetails `json:"contract,omitempty"`

	// For wallets
	Wallet *WalletDetails `json:"wallet,omitempty"`

	// For tokens (ERC-20, ERC-721, etc.)
	Token *TokenDetails `json:"token,omitempty"`

	// For DeFi protocols
	DeFi *DeFiDetails `json:"defi,omitempty"`

	// For NFT collections
	NFT *NFTCollectionDetails `json:"nft,omitempty"`
}

Web3Technical contains Web3-specific technical details for smart contracts, wallets, tokens, and other blockchain assets.

type Web3VulnerabilityClass

type Web3VulnerabilityClass string

Web3VulnerabilityClass represents common Web3 vulnerability classes.

const (
	// SWC-100 series - Basic
	Web3VulnReentrancy          Web3VulnerabilityClass = "reentrancy"           // SWC-107
	Web3VulnIntegerOverflow     Web3VulnerabilityClass = "integer_overflow"     // SWC-101
	Web3VulnIntegerUnderflow    Web3VulnerabilityClass = "integer_underflow"    // SWC-101
	Web3VulnAccessControl       Web3VulnerabilityClass = "access_control"       // SWC-105
	Web3VulnUncheckedCall       Web3VulnerabilityClass = "unchecked_call"       // SWC-104
	Web3VulnDelegateCall        Web3VulnerabilityClass = "delegate_call"        // SWC-112
	Web3VulnSelfDestruct        Web3VulnerabilityClass = "self_destruct"        // SWC-106
	Web3VulnTxOrigin            Web3VulnerabilityClass = "tx_origin"            // SWC-115
	Web3VulnTimestampDependence Web3VulnerabilityClass = "timestamp_dependence" // SWC-116
	Web3VulnBlockHashDependence Web3VulnerabilityClass = "blockhash_dependence" // SWC-120

	// DeFi-specific
	Web3VulnFlashLoan          Web3VulnerabilityClass = "flash_loan_attack"
	Web3VulnOracleManipulation Web3VulnerabilityClass = "oracle_manipulation"
	Web3VulnFrontRunning       Web3VulnerabilityClass = "front_running"
	Web3VulnSandwichAttack     Web3VulnerabilityClass = "sandwich_attack"
	Web3VulnSlippage           Web3VulnerabilityClass = "slippage_attack"
	Web3VulnPriceManipulation  Web3VulnerabilityClass = "price_manipulation"
	Web3VulnGovernanceAttack   Web3VulnerabilityClass = "governance_attack"
	Web3VulnLiquidityDrain     Web3VulnerabilityClass = "liquidity_drain"
	Web3VulnMEV                Web3VulnerabilityClass = "mev_vulnerability"

	// Token-specific
	Web3VulnHoneypot          Web3VulnerabilityClass = "honeypot"
	Web3VulnHiddenMint        Web3VulnerabilityClass = "hidden_mint"
	Web3VulnHiddenFee         Web3VulnerabilityClass = "hidden_fee"
	Web3VulnBlacklistAbuse    Web3VulnerabilityClass = "blacklist_abuse"
	Web3VulnRenounceOwnership Web3VulnerabilityClass = "fake_renounce"

	// Proxy & Upgrade
	Web3VulnStorageCollision   Web3VulnerabilityClass = "storage_collision"
	Web3VulnUninitializedProxy Web3VulnerabilityClass = "uninitialized_proxy"
	Web3VulnUpgradeVuln        Web3VulnerabilityClass = "upgrade_vulnerability"

	// Cryptographic
	Web3VulnWeakRandomness        Web3VulnerabilityClass = "weak_randomness" // SWC-120
	Web3VulnSignatureMalleability Web3VulnerabilityClass = "signature_malleability"
	Web3VulnReplayAttack          Web3VulnerabilityClass = "replay_attack"

	// Gas & DoS
	Web3VulnDosGasLimit      Web3VulnerabilityClass = "dos_gas_limit"
	Web3VulnUnboundedLoop    Web3VulnerabilityClass = "unbounded_loop"
	Web3VulnDosBlockStuffing Web3VulnerabilityClass = "dos_block_stuffing"

	// Logic
	Web3VulnBusinessLogic      Web3VulnerabilityClass = "business_logic"
	Web3VulnInvariantViolation Web3VulnerabilityClass = "invariant_violation"
)

func AllWeb3VulnerabilityClasses

func AllWeb3VulnerabilityClasses() []Web3VulnerabilityClass

AllWeb3VulnerabilityClasses returns all Web3 vulnerability classes.

type Web3VulnerabilityDetails

type Web3VulnerabilityDetails struct {
	// Vulnerability class/category (SWC ID or custom)
	// Common: reentrancy, overflow, access_control, front_running, etc.
	VulnerabilityClass string `json:"vulnerability_class,omitempty"`

	// SWC Registry ID (e.g., SWC-107 for reentrancy)
	SWCID string `json:"swc_id,omitempty"`

	// Contract address affected
	ContractAddress string `json:"contract_address,omitempty"`

	// Chain ID
	ChainID int64 `json:"chain_id,omitempty"`

	// Chain name
	Chain string `json:"chain,omitempty"`

	// Affected function signature
	FunctionSignature string `json:"function_signature,omitempty"`

	// Affected function selector (4 bytes)
	FunctionSelector string `json:"function_selector,omitempty"`

	// Vulnerable code pattern
	VulnerablePattern string `json:"vulnerable_pattern,omitempty"`

	// Bytecode offset (if found in bytecode analysis)
	BytecodeOffset int `json:"bytecode_offset,omitempty"`

	// Is exploitable on mainnet
	ExploitableOnMainnet bool `json:"exploitable_on_mainnet,omitempty"`

	// Estimated impact in USD (if quantifiable)
	EstimatedImpactUSD float64 `json:"estimated_impact_usd,omitempty"`

	// Affected assets value in USD
	AffectedValueUSD float64 `json:"affected_value_usd,omitempty"`

	// Attack vector description
	AttackVector string `json:"attack_vector,omitempty"`

	// Proof of concept (if available)
	POC *Web3POC `json:"poc,omitempty"`

	// Related transaction hashes (if exploit occurred)
	RelatedTxHashes []string `json:"related_tx_hashes,omitempty"`

	// Attacker addresses (if known)
	AttackerAddresses []string `json:"attacker_addresses,omitempty"`

	// Tool that found this: slither, mythril, securify, manticore, etc.
	DetectionTool string `json:"detection_tool,omitempty"`

	// Detection confidence: high, medium, low
	DetectionConfidence string `json:"detection_confidence,omitempty"`

	// Is false positive
	IsFalsePositive bool `json:"is_false_positive,omitempty"`

	// Gas optimization issues (for gas-related findings)
	GasIssue *GasIssue `json:"gas_issue,omitempty"`

	// Access control details
	AccessControl *AccessControlIssue `json:"access_control,omitempty"`

	// Reentrancy details
	Reentrancy *ReentrancyIssue `json:"reentrancy,omitempty"`

	// Oracle manipulation details
	OracleManipulation *OracleManipulationIssue `json:"oracle_manipulation,omitempty"`

	// Flash loan attack details
	FlashLoan *FlashLoanIssue `json:"flash_loan,omitempty"`
}

Web3VulnerabilityDetails contains Web3/smart contract vulnerability-specific details.

type WebLocation added in v1.6.0

type WebLocation struct {
	// URL is the redacted URL: no query values, user info or fragment.
	URL string `json:"url"`

	Method string `json:"method,omitempty"`

	// EndpointRef names an endpoint of this report.
	EndpointRef string `json:"endpoint_ref,omitempty"`

	// Parameter is the parameter the finding is about.
	Parameter *WebParameter `json:"parameter,omitempty"`

	// RequestRef names the evidence of the request ("sha256:<hex>" or an
	// attachment id).
	RequestRef string `json:"request_ref,omitempty"`

	StatusCode int `json:"status_code,omitempty"`
}

WebLocation is where on a web origin a finding was observed.

type WebParameter added in v1.6.0

type WebParameter struct {
	Location ParamLocation `json:"location"`
	Name     string        `json:"name"`
}

WebParameter is one parameter of a request.

Directories

Path Synopsis
Package capability is the OpenCTEM capability taxonomy: the closed, versioned list of acts a scan tool can perform ("scan.ports@1", "probe.http@1", ...), and the contract every implementation of an act honors.
Package capability is the OpenCTEM capability taxonomy: the closed, versioned list of acts a scan tool can perform ("scan.ports@1", "probe.http@1", ...), and the contract every implementation of an act honors.
Package fingerprint provides unified fingerprint generation algorithms for deduplication of security findings across SDK and Backend.
Package fingerprint provides unified fingerprint generation algorithms for deduplication of security findings across SDK and Backend.
Package importer converts the files other security tools export into CTIS 1.4 reports: Nessus v2 XML, Qualys host detection XML (joined with the Qualys KnowledgeBase), CycloneDX and SPDX SBOMs, OSV records, CSAF 2.0 and OpenVEX documents, DefectDojo Generic Findings JSON, SARIF 2.1.0, and the native JSON of trivy, nuclei, semgrep, betterleaks and vuls.
Package importer converts the files other security tools export into CTIS 1.4 reports: Nessus v2 XML, Qualys host detection XML (joined with the Qualys KnowledgeBase), CycloneDX and SPDX SBOMs, OSV records, CSAF 2.0 and OpenVEX documents, DefectDojo Generic Findings JSON, SARIF 2.1.0, and the native JSON of trivy, nuclei, semgrep, betterleaks and vuls.
mapping
Package mapping turns the JSON or JSON Lines output of any command-line tool into a CTIS report through a declarative mapping file, so a tool that writes JSON needs no parser code.
Package mapping turns the JSON or JSON Lines output of any command-line tool into a CTIS report through a declarative mapping file, so a tool that writes JSON needs no parser code.
Package severity provides unified severity level definitions and mappings for security findings across SDK and Backend.
Package severity provides unified severity level definitions and mappings for security findings across SDK and Backend.
transfer module
Package weburl is the one URL library of the web attack surface: the sensor, the SDK and the platform parse, normalise and template web URLs the same way, so an endpoint found by one tool and one found by another land on the same row.
Package weburl is the one URL library of the web attack surface: the sensor, the SDK and the platform parse, normalise and template web URLs the same way, so an endpoint found by one tool and one found by another land on the same row.

Jump to

Keyboard shortcuts

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