Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
openctem
command
Command openctem is the OpenCTEM developer CLI.
|
Command openctem is the OpenCTEM developer CLI. |
|
openctem-conformance
command
Command openctem-conformance checks a tool written in any language against adapter protocol v1 and its contract, the way a sensor will run it.
|
Command openctem-conformance checks a tool written in any language against adapter protocol v1 and its contract, the way a sensor will run it. |
|
sensor-migrate
command
Command sensor-migrate upgrades a Go module from the SDK's pre-sensor API (sdk-go v0.6 and older: core.BaseAgent, client.WithAgentID, ...) to the sensor API (RFC-023 §9.5).
|
Command sensor-migrate upgrades a Go module from the SDK's pre-sensor API (sdk-go v0.6 and older: core.BaseAgent, client.WithAgentID, ...) to the sensor API (RFC-023 §9.5). |
|
examples
|
|
|
custom-adapter
command
Example: converting a tool's SARIF output to CTIS
|
Example: converting a tool's SARIF output to CTIS |
|
custom-scanner
command
Example: Custom Scanner Implementation
|
Example: Custom Scanner Implementation |
|
integration-test
command
Package main provides an integration test example for the OpenCTEM SDK.
|
Package main provides an integration test example for the OpenCTEM SDK. |
|
minimal-sensor
command
Example: a complete OpenCTEM sensor in one file.
|
Example: a complete OpenCTEM sensor in one file. |
|
internal
|
|
|
sensorrename
Package sensorrename is the type-aware "agent" -> "sensor" rename shared by the SDK's own rename script (scripts/rename/sensorrename) and the codemod third parties run on their code (cmd/sensor-migrate).
|
Package sensorrename is the type-aware "agent" -> "sensor" rename shared by the SDK's own rename script (scripts/rename/sensorrename) and the codemod third parties run on their code (cmd/sensor-migrate). |
|
sensorstate
Package sensorstate keeps an API-key sensor's state: the state directory, the credentials file in it (the renewed API key, written atomically and 0600), the choice between the configured and the renewed key at start, and the key renewal loop with its protocol v2 client (POST /api/v2/sensor/keys).
|
Package sensorstate keeps an API-key sensor's state: the state directory, the credentials file in it (the renewed API key, written atomically and 0600), the choice between the configured and the renewed key at start, and the key renewal loop with its protocol v2 client (POST /api/v2/sensor/keys). |
|
toolcli
Package toolcli is the "openctem tool" command: scaffold, validate, run, test, diff and describe a tool.
|
Package toolcli is the "openctem tool" command: scaffold, validate, run, test, diff and describe a tool. |
|
toolrt
Package toolrt holds the rules every tool's output passes, shared by the tool side (pkg/tool/adapter, pkg/testkit) and the runtime side (pkg/sensorkit/toolhost): record validation against CTIS and the manifest's produces, sanitization, size and count caps, report assembly and provenance stamping.
|
Package toolrt holds the rules every tool's output passes, shared by the tool side (pkg/tool/adapter, pkg/testkit) and the runtime side (pkg/sensorkit/toolhost): record validation against CTIS and the manifest's produces, sanitization, size and count caps, report assembly and provenance stamping. |
|
tools/apitiers
command
Command apitiers prints the stability tier of every public package of a module tree, from its package documentation (docs/STABILITY.md):
|
Command apitiers prints the stability tier of every public package of a module tree, from its package documentation (docs/STABILITY.md): |
|
toolwire
Package toolwire holds the messages of adapter protocol v1: newline- delimited JSON between the runtime and a tool process, over the tool's stdin and stdout, one task per process (docs/rfcs/sensor-sdk-v2.md, D.4.2).
|
Package toolwire holds the messages of adapter protocol v1: newline- delimited JSON between the runtime and a tool process, over the tool's stdin and stdout, one task per process (docs/rfcs/sensor-sdk-v2.md, D.4.2). |
|
pkg
|
|
|
adapt
Package adapt holds the sensor's adaptive controllers and the one table of their bounds (RFC-074 in openctemio/openctem api/docs/rfcs, RFC-074-adaptive-sensor-control.md).
|
Package adapt holds the sensor's adaptive controllers and the one table of their bounds (RFC-074 in openctemio/openctem api/docs/rfcs, RFC-074-adaptive-sensor-control.md). |
|
blobsig
Package blobsig verifies a sigstore (cosign keyless) signature of a downloaded file, offline: the certificate chains to the Sigstore public good Fulcio roots, the signature is in the Rekor transparency log (the inclusion proof and signed timestamp travel in the bundle), and the certificate names exactly the signer the caller expects (OIDC issuer and subject, for a GitHub workflow its file and ref).
|
Package blobsig verifies a sigstore (cosign keyless) signature of a downloaded file, offline: the certificate chains to the Sigstore public good Fulcio roots, the signature is in the Rekor transparency log (the inclusion proof and signed timestamp travel in the bundle), and the certificate names exactly the signer the caller expects (OIDC issuer and subject, for a GitHub workflow its file and ref). |
|
chunk
Package chunk splits a large CTIS report into protocol v2 segments (api RFC-026 §3.5): SplitSegments returns complete CTIS documents, each with the report's tool and metadata and the assets its findings reference, within the platform's per-segment limits.
|
Package chunk splits a large CTIS report into protocol v2 segments (api RFC-026 §3.5): SplitSegments returns complete CTIS documents, each with the report's tool and metadata and the assets its findings reference, within the platform's per-segment limits. |
|
client
Package client provides the OpenCTEM API client.
|
Package client provides the OpenCTEM API client. |
|
compress
Package compress provides compression utilities for large payloads.
|
Package compress provides compression utilities for large payloads. |
|
conformance
Package conformance is the sensor protocol conformance suite (RFC-026 WP-S3, RFC-023 D23), starting with results ingest.
|
Package conformance is the sensor protocol conformance suite (RFC-026 WP-S3, RFC-023 D23), starting with results ingest. |
|
core
Package core provides the core interfaces and base implementations for the OpenCTEM Scanner SDK.
|
Package core provides the core interfaces and base implementations for the OpenCTEM Scanner SDK. |
|
ctis
Package ctis is the SDK's name for the CTIS data model (github.com/openctemio/ctis).
|
Package ctis is the SDK's name for the CTIS data model (github.com/openctemio/ctis). |
|
ctis/internal/genalias
command
Command genalias writes pkg/ctis/zz_generated_aliases.go: one type alias, constant, variable or wrapper function in package ctis for every exported identifier of the root package of github.com/openctemio/ctis, at the version go.mod requires.
|
Command genalias writes pkg/ctis/zz_generated_aliases.go: one type alias, constant, variable or wrapper function in package ctis for every exported identifier of the root package of github.com/openctemio/ctis, at the version go.mod requires. |
|
gitenv
Package gitenv provides auto-detection and abstraction for CI/CD environments.
|
Package gitenv provides auto-detection and abstraction for CI/CD environments. |
|
httpsec
Package httpsec provides SSRF-safe URL validation and HTTP client construction for the OpenCTEM SDK.
|
Package httpsec provides SSRF-safe URL validation and HTTP client construction for the OpenCTEM SDK. |
|
importtool
Package importtool is the file importer as a parser-class tool of the tool contract (pkg/tool): it converts files other security tools export (Nessus v2 XML, Qualys detection XML with its KnowledgeBase, DefectDojo Generic Findings JSON, CycloneDX, SPDX, osv-scanner results, CSAF and OpenVEX) into CTIS with the ctis importer package, so the conversion runs in the tool sandbox of a sensor instead of on the platform.
|
Package importtool is the file importer as a parser-class tool of the tool contract (pkg/tool): it converts files other security tools export (Nessus v2 XML, Qualys detection XML with its KnowledgeBase, DefectDojo Generic Findings JSON, CycloneDX, SPDX, osv-scanner results, CSAF and OpenVEX) into CTIS with the ctis importer package, so the conversion runs in the tool sandbox of a sensor instead of on the platform. |
|
internal/absname
Package absname makes a target name absolute (a trailing dot) for the SDK's own lookups.
|
Package absname makes a target name absolute (a trailing dot) for the SDK's own lookups. |
|
internal/assetctx
Package assetctx gives the SDK's converters the asset their findings belong to.
|
Package assetctx gives the SDK's converters the asset their findings belong to. |
|
internal/cirepo
Package cirepo reads the repository a CI job is building from the CI environment (GitHub Actions, GitLab CI), for converters that must name the repository their findings belong to when the caller did not.
|
Package cirepo reads the repository a CI job is building from the CI environment (GitHub Actions, GitLab CI), for converters that must name the repository their findings belong to when the caller did not. |
|
jobsig
Package jobsig verifies signed jobs on the sensor (api docs/rfcs/RFC-040-platform-sensor-mutual-distrust.md §5.6; wire format in api docs/architecture/job-signing.md).
|
Package jobsig verifies signed jobs on the sensor (api docs/rfcs/RFC-040-platform-sensor-mutual-distrust.md §5.6; wire format in api docs/architecture/job-signing.md). |
|
localstore
Package localstore is the sensor's encrypted, crash-safe local store: the key hierarchy and the sealed records that the outbox, the job journal, the content cache index and the policy cache are kept in.
|
Package localstore is the sensor's encrypted, crash-safe local store: the key hierarchy and the sealed records that the outbox, the job journal, the content cache index and the policy cache are kept in. |
|
mocks
Package mocks provides mock implementations for testing.
|
Package mocks provides mock implementations for testing. |
|
netctx
Package netctx is a sensor's network self-description: what the host owner declares (site, routes it reaches, DNS suffixes, internet mode), what the SDK detects on the host (interfaces, routes, resolvers, the egress path to the platform) and a fingerprint that changes when the sensor moves.
|
Package netctx is a sensor's network self-description: what the host owner declares (site, routes it reaches, DNS suffixes, internet mode), what the SDK detects on the host (interfaces, routes, resolvers, the egress path to the platform) and a fingerprint that changes when the sensor moves. |
|
outbox
Package outbox is the sensor's durable, write-ahead queue of results waiting for the platform.
|
Package outbox is the sensor's durable, write-ahead queue of results waiting for the platform. |
|
reach
Package reach tells, per target, whether this sensor got a path to it, and summarizes it on the job result so the platform can tell "nothing found" from "not reached" and route the next job to a sensor that can reach the target (RFC-089 in openctemio/openctem, api/docs/rfcs).
|
Package reach tells, per target, whether this sensor got a path to it, and summarizes it on the job result so the platform can tell "nothing found" from "not reached" and route the next job to a sensor that can reach the target (RFC-089 in openctemio/openctem, api/docs/rfcs). |
|
relayclient
Package relayclient carries a sensor's platform requests through a sensor relay (api docs/rfcs/RFC-116-sensor-relay.md in openctemio/openctem; openctem research 194 §4).
|
Package relayclient carries a sensor's platform requests through a sensor relay (api docs/rfcs/RFC-116-sensor-relay.md in openctemio/openctem; openctem research 194 §4). |
|
resource
Package resource provides system resource monitoring and control.
|
Package resource provides system resource monitoring and control. |
|
retry
Package retry provides persistent retry queue functionality for failed API operations.
|
Package retry provides persistent retry queue functionality for failed API operations. |
|
scopelimit
Package scopelimit is the port, protocol and path limits of a job's targets (api docs/rfcs/RFC-065-bug-bounty-programs.md §16.8): a target the organization's scope covers only through a port-limited entry ("api.example.com:8443/tcp") or a path-limited URL entry ("https://example.com/api/") may be scanned only on those ports and under that path.
|
Package scopelimit is the port, protocol and path limits of a job's targets (api docs/rfcs/RFC-065-bug-bounty-programs.md §16.8): a target the organization's scope covers only through a port-limited entry ("api.example.com:8443/tcp") or a path-limited URL entry ("https://example.com/api/") may be scanned only on those ports and under that path. |
|
sdk
Package sdk identifies this SDK: its name and release version.
|
Package sdk identifies this SDK: its name and release version. |
|
sealedmsg
Package sealedmsg is the end-to-end envelope a sensor and the platform exchange through an intermediary they do not trust: a relay, an object store, any store-and-forward hop (openctem research 194 §4.3).
|
Package sealedmsg is the end-to-end envelope a sensor and the platform exchange through an intermediary they do not trust: a relay, an object store, any store-and-forward hop (openctem research 194 §4.3). |
|
sensorkit
Package sensorkit is everything a sensor needs to work with the OpenCTEM platform, in one call: a sensor implements its tools, the kit runs the rest.
|
Package sensorkit is everything a sensor needs to work with the OpenCTEM platform, in one call: a sensor implements its tools, the kit runs the rest. |
|
sensorkit/contentcache
Package contentcache is the sensor's cache of content packs (api docs/rfcs/RFC-061-content-packs.md §3.4): immutable archives of templates, rules and wordlists, addressed by their sha256 digest and signed by the platform.
|
Package contentcache is the sensor's cache of content packs (api docs/rfcs/RFC-061-content-packs.md §3.4): immutable archives of templates, rules and wordlists, addressed by their sha256 digest and signed by the platform. |
|
sensorkit/egress
Package egress is a task's way out to the network: a forwarder that every connection of a confined tool goes through (RFC-060 in openctemio/openctem api/docs/rfcs; the forwarder RFC-034 designs for proxied zones is the same one).
|
Package egress is a task's way out to the network: a forwarder that every connection of a confined tool goes through (RFC-060 in openctemio/openctem api/docs/rfcs; the forwarder RFC-034 designs for proxied zones is the same one). |
|
sensorkit/executor
Package executor runs one task (one tool invocation) for a sensor, in a sandbox.
|
Package executor runs one task (one tool invocation) for a sensor, in a sandbox. |
|
sensorkit/identity
Package identity is a key-bound sensor's identity on disk and the interactive pairing that creates it (api RFC-052): the sensor makes its own Ed25519 key, pairs with the platform (an administrator compares the short authentication string and approves), and from then on signs every request with that key.
|
Package identity is a key-bound sensor's identity on disk and the interactive pairing that creates it (api RFC-052): the sensor makes its own Ed25519 key, pairs with the platform (an administrator compares the short authentication string and approves), and from then on signs every request with that key. |
|
sensorkit/settings
Package settings is the sensor settings registry: every setting a sensor reads, declared once with its name, type, whether it is required, its default, whether it is a secret, a description, a docs link and a validation.
|
Package settings is the sensor settings registry: every setting a sensor reads, declared once with its name, type, whether it is required, its default, whether it is a secret, a description, a docs link and a validation. |
|
sensorkit/toolhost
Package toolhost is the runtime side of the tool contract: it runs one task of a tool (pkg/tool) out of process, inside the Executor sandbox (pkg/sensorkit/executor), and turns what the tool reports into a checked, stamped CTIS report.
|
Package toolhost is the runtime side of the tool contract: it runs one task of a tool (pkg/tool) out of process, inside the Executor sandbox (pkg/sensorkit/executor), and turns what the tool reports into a checked, stamped CTIS report. |
|
sensorkit/workspace
Package workspace gives each job a private working directory on the sensor's data volume (openctem research 194 §5.4 (4)):
|
Package workspace gives each job a private working directory on the sensor's data volume (openctem research 194 §5.4 (4)): |
|
sensorproto/legacyv1
Package legacyv1 is the only place the SDK still spells the pre-sensor "agent" vocabulary (RFC-023 §9.5).
|
Package legacyv1 is the only place the SDK still spells the pre-sensor "agent" vocabulary (RFC-023 §9.5). |
|
sensorproto/pairing
Package pairing is the interactive sensor pairing protocol (api RFC-052): a sensor that has only the platform URL creates its own Ed25519 key, asks the platform to pair, and an administrator approves it after comparing a short authentication string (SAS) shown on both sides.
|
Package pairing is the interactive sensor pairing protocol (api RFC-052): a sensor that has only the platform URL creates its own Ed25519 key, asks the platform to pair, and an administrator approves it after comparing a short authentication string (SAS) shown on both sides. |
|
sensorproto/relay
Package relay is the sensor side of the sensor relay's wire contract (api docs/rfcs/RFC-116-sensor-relay.md in openctemio/openctem): the paths a sensor calls, the ticket header, and the batch framing of the envelopes it receives.
|
Package relay is the sensor side of the sensor relay's wire contract (api docs/rfcs/RFC-116-sensor-relay.md in openctemio/openctem): the paths a sensor calls, the ticket header, and the batch framing of the envelopes it receives. |
|
sensorproto/v2
Package v2 is the client side of sensor protocol v2 results ingest (RFC-026, api docs/rfcs/RFC-026-sensor-results-ingest.md): the paths, media type, headers, problem types, status resource, hello document and the Content-Digest the SDK sends.
|
Package v2 is the client side of sensor protocol v2 results ingest (RFC-026, api docs/rfcs/RFC-026-sensor-results-ingest.md): the paths, media type, headers, problem types, status resource, hello document and the Content-Digest the SDK sends. |
|
sensorproto/v3
Package sensorv3 is the generated Go code of sensor protocol v3 (openctem api RFC-059), from proto/sensor-v3, a byte-for-byte copy of the platform's proto.
|
Package sensorv3 is the generated Go code of sensor protocol v3 (openctem api RFC-059), from proto/sensor-v3, a byte-for-byte copy of the platform's proto. |
|
sensorproto/v3/sensorv3connect
Package sensorv3connect is the generated Connect (gRPC, gRPC-Web, Connect) client and handler of sensor protocol v3 (openctem api RFC-059).
|
Package sensorv3connect is the generated Connect (gRPC, gRPC-Web, Connect) client and handler of sensor protocol v3 (openctem api RFC-059). |
|
sensorsig
Package sensorsig is the HTTP message signature profile a key-bound sensor uses on every platform request (api RFC-032 E5, api RFC-052): RFC 9421 signatures with the sensor's Ed25519 key and an RFC 9530 Content-Digest over the body.
|
Package sensorsig is the HTTP message signature profile a key-bound sensor uses on every platform request (api RFC-032 E5, api RFC-052): RFC 9421 signatures with the sensor's Ed25519 key and an RFC 9530 Content-Digest over the body. |
|
shared/fingerprint
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. |
|
shared/severity
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. |
|
source
Package source fetches the code of a platform code scan: exactly one commit of one repository (ctis source.Repository), read-only, into a private directory a scanner then reads.
|
Package source fetches the code of a platform code scan: exactly one commit of one repository (ctis source.Repository), read-only, into a private directory a scanner then reads. |
|
testkit
Package testkit runs a tool (pkg/tool) in-process for tests, with the rules the runtime applies in production: the manifest must be valid, the configuration must match its schema, only declared credentials are delivered, every record is checked (CTIS validity, declared output types, size and count limits, control characters), and the report is assembled and stamped as the runtime does.
|
Package testkit runs a tool (pkg/tool) in-process for tests, with the rules the runtime applies in production: the manifest must be valid, the configuration must match its schema, only declared credentials are delivered, every record is checked (CTIS validity, declared output types, size and count limits, control characters), and the report is assembled and stamped as the runtime does. |
|
tool
Package tool is the one contract for every workload a sensor runs: a target scanner, a connector to a vendor API, a parser of a file or an enricher of findings.
|
Package tool is the one contract for every workload a sensor runs: a target scanner, a connector to a vendor API, a parser of a file or an enricher of findings. |
|
tool/adapter
Package adapter runs a tool (pkg/tool) as an adapter process: the tool's side of adapter protocol v1, newline-delimited JSON on stdin and stdout, one task per process (docs/rfcs/sensor-sdk-v2.md, D.4.2).
|
Package adapter runs a tool (pkg/tool) as an adapter process: the tool's side of adapter protocol v1, newline-delimited JSON on stdin and stdout, one task per process (docs/rfcs/sensor-sdk-v2.md, D.4.2). |
|
tool/toolcompat
Package toolcompat runs code written against the older interfaces (core.Scanner, core.Collector) as tools of the tool contract (pkg/tool), so it gets the contract's runtime without a rewrite: out-of-process execution in the task sandbox, admission against the policy, declared credentials only, checked and stamped output.
|
Package toolcompat runs code written against the older interfaces (core.Scanner, core.Collector) as tools of the tool contract (pkg/tool), so it gets the contract's runtime without a rewrite: out-of-process execution in the task sandbox, admission against the policy, declared credentials only, checked and stamped output. |
|
useragent
Package useragent builds the User-Agent the SDK sends to the platform and to the services its collectors and enrichers call:
|
Package useragent builds the User-Agent the SDK sends to the platform and to the services its collectors and enrichers call: |
|
webscope
Package webscope is the web scope of a job: which hosts, paths and methods a web tool (a crawler, a DAST scanner) may request.
|
Package webscope is the web scope of a job: which hosts, paths and methods a web tool (a crawler, a DAST scanner) may request. |
|
politeness
module
|
|
|
transfer
module
|
|
|
scripts
|
|
|
rename/sensorrename
command
Command sensorrename performs the type-aware "agent" -> "sensor" rename of the SDK's own Go code (RFC-023 §9.5).
|
Command sensorrename performs the type-aware "agent" -> "sensor" rename of the SDK's own Go code (RFC-023 §9.5). |
Click to show internal directories.
Click to hide internal directories.