scanner

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package scanner is abcd's native secret + PII detector. It ports the Python PII scanner (scripts/abcd/src/pii.py) and the bundled secret patterns (scripts/abcd/defaults/pii.json) into a transport-agnostic Go engine: it reads files under a caller-supplied root, inspects their CONTENT, and returns structured findings — no printing, no os.Exit, no external tool (no gitleaks/trufflehog shell-out) — so it is fully testable and reusable across surfaces. The always-on native scanner is the default; deeper opt-in scanners fail closed when absent.

RE2 constraint: Go's regexp has no lookaround or backreferences, so every ported lookaround becomes a Go post-match predicate (see patterns.go and identity.go). regexp2 is deliberately NOT used (it would be a new dependency).

Index

Constants

View Source
const OutboundPolicy = "Never put a live session URL or a tool's own attribution footer " +
	"(\"generated with/by <tool>\") into public text — a pull-request body, an issue, a comment, " +
	"a commit message or a release note. Disclosure goes in the repository's own trailer " +
	"(Assisted-by: <Vendor>:<model-version>) and nowhere else. " +
	"After creating ANY pull request, issue or comment, re-read what was actually created and strip " +
	"any session URL or attribution footer from it: the harness appends them outside your own output, " +
	"so text that left you clean can arrive dirty, and the forge keeps the pre-edit revision of what " +
	"was posted — which is why the strip has to happen immediately, not at review time."

OutboundPolicy is the policy block an autonomous routine's prompt carries. It is a value rather than prose in a document because the prompt assembly, the audit rule's fix hint and this package's own contract must say the same thing: a policy that exists in three wordings is a policy with three meanings.

Variables

This section is empty.

Functions

func CallerHome added in v0.6.9

func CallerHome() string

CallerHome resolves the caller's home directory as ProbeIdentity does — $HOME first (so tests and redirected runs agree), then os.UserHomeDir — trimmed of any trailing slash. Empty when neither resolves.

func DefaultIdentitySeverities

func DefaultIdentitySeverities() map[string]Severity

DefaultIdentitySeverities is the built-in severity floor per identity kind (ported from pii.py DEFAULT_IDENTITY_SEVERITIES). A config override may raise but never lower these.

func IsHarnessLeakKind added in v0.6.8

func IsHarnessLeakKind(kind string) bool

IsHarnessLeakKind reports whether a finding kind belongs to the harness-leak class. It is the selector the outbound scrub and the lint surfaces key on, so membership is declared once here rather than by each of them matching strings.

func IsIdentityKind

func IsIdentityKind(kind string) bool

IsIdentityKind reports whether a finding kind is a PII identity span (masked to a readable placeholder) rather than a secret token (masked to a fingerprint). The network kinds belong here too: an address, a MAC and a hostname are IDENTIFIERS, not high-entropy secrets. The secret fingerprint deliberately keeps the first three and last two runes so a leaked credential can be triaged, and on an identifier that is precisely the wrong trade — it preserves a MAC's vendor bytes and final octet, and a hostname's head and suffix, which is enough to re-identify the machine the redaction was meant to hide.

func IsNonUserHomeSegment

func IsNonUserHomeSegment(seg string) bool

IsNonUserHomeSegment reports whether seg, the segment immediately after a /Users home root, names a system directory rather than a user. The comparison is case-insensitive because a case-folding filesystem resolves /users/shared to the same directory.

func IsPersonaName added in v0.9.0

func IsPersonaName(seg string) bool

IsPersonaName reports whether seg is a given name from the persona registry, compared the way a path segment spells it: case-folded, because a home directory for the persona the conventions mandate is written `/Users/alice` whatever case the registry entry uses.

This is the SAME list personaDerivedHost consults for device names (iss-2609100505145554): the record asks for a persona home path to be treated "the same way a persona-derived device name is", and one list is what makes the two answers agree. A caller applying it to a home path must scope it to the username POSITION and must yield to the caller's own home — the case folding that is harmless for a fixture hostname is not, on its own, enough for a home path, because a real account for a person called Alice is spelled exactly like the fixture.

func MaxBinaryScanBytesForTest added in v0.6.9

func MaxBinaryScanBytesForTest() int

MaxBinaryScanBytesForTest exposes the byte-scan cap so the sibling privacy lint's tests can hold the two caps equal (repolint imports this package, so the constant cannot be shared the other way).

func Redact

func Redact(text string, findings []Finding) (string, int)

Redact rewrites every finding's matched span out of text, returning the sanitised text and the count of spans actually changed. It is the shared write-time sanitiser: both the history transcript store and any other pre-disk redactor route through it so the masking discipline lives in ONE place (it reuses the same maskSecret fingerprint Finding.MarshalJSON applies to the serialized surface).

EVERY kind is masked by AUTHORITATIVE BYTE SPAN — secret tokens to a non-reversible fingerprint (sealLine), identity kinds to a neutral placeholder (a self home path collapses to "~"). Byte-span masking is what makes two PARTIALLY overlapping secret spans safe: substring replacement, longest-first, used to let the wider match consume the narrower one's leading bytes so the narrower ReplaceAll found nothing and its raw tail survived — sealLine instead forces every overlap byte to '*'. Identity spans run AFTER the secrets are sealed, when no raw secret bytes remain and the seal has changed no byte COUNT, so the detector's offsets still describe the same bytes. Redact is only stage one; the caller MUST re-scan the result and fail closed if any hard_fail span survived.

Identity masking WAS a per-line strings.ReplaceAll, recorded as deliberate because an identity placeholder is length-changing and a whole-string rewrite needs no offsets. iss-2609120446083912 retired that choice: a whole-string replace cannot say "this occurrence masked, that one left", so it overrode every refusal the detector had learned to make — a reverse-DNS bundle component, a mid-word collision, an occurrence inside a URL — whenever a genuine mention shared the line, corrupting the technical content the record exists to hold. maskIdentitySpans below states the mechanism and names the fail-open cost the reversal accepts.

func SweepCallerHome added in v0.6.9

func SweepCallerHome(text, home string) string

SweepCallerHome is the deterministic literal $HOME backstop, independent of the pattern heuristic: every occurrence of home that stands as a path is collapsed to "~". An occurrence stands as a path when nothing path-like precedes it (the start of the text, or a byte that cannot continue a path segment) and nothing name-like follows it (the end, a separator, or any byte outside the username-continuation set). An unanchored replace turned "/rootfs/etc/hosts" into "~fs/etc/hosts" under HOME=/root and "/home/abc/x" into "~bc/x" under HOME=/home/a, silently corrupting the committed text; the anchor is what lets a short home coexist with the paths that merely share its prefix. An empty home sweeps nothing.

Types

type BundleFile

type BundleFile struct {
	LogicalPath  string
	ResolvedPath string
}

BundleFile is the minimal descriptor ScanBundle needs. It is defined here (rather than importing the launch package) so the scanner has NO dependency on launch — that would create an import cycle, since launch's dry-run orchestrator imports the scanner. The launch package adapts its IncludedFile slice to this.

type Config

type Config struct {
	SkipDirs           []string              `json:"skip_dirs"`
	SkipPathFragments  []string              `json:"skip_path_fragments"`
	SkipExtensions     []string              `json:"skip_extensions"`
	SkipFilenames      []string              `json:"skip_filenames"`
	Patterns           map[string]patternDef `json:"patterns"`
	IdentitySeverities map[string]Severity   `json:"identity_severities"`
}

Config is the on-disk scanner configuration (the per-repo pii.json override shape). Only the consumed fields are modelled.

type Finding

type Finding struct {
	File      string   `json:"file"`
	Line      int      `json:"line"`
	Column    int      `json:"column"`
	Kind      string   `json:"kind"`
	Severity  Severity `json:"severity"`
	Snippet   string   `json:"snippet"`
	Matched   string   `json:"matched"`
	Suggested string   `json:"suggested_fix,omitempty"`
	// contains filtered or unexported fields
}

Finding is one secret or PII detection. File is the bundle logical path; Line and Column are 1-based.

func BlockingResidual added in v0.6.9

func BlockingResidual(findings []Finding) []Finding

BlockingResidual filters a stage-two rescan to the findings that must refuse a write. Severity alone is the wrong gate: the hostname patterns are shape heuristics and therefore warn by design, so a LAN host or device name that survived stage-one redaction would otherwise be committed in silence — the very class of leak the stores exist to stop. Any surviving IDENTITY or NETWORK span refuses the write whatever its severity; everything else still gates on hard_fail. After the stage-one detector fixes this path is rarely reachable, which is what a backstop is for.

func CheckOutbound added in v0.9.0

func CheckOutbound(repoRoot, text, label string) ([]Finding, error)

CheckOutbound is the CHECK-direction twin of ScrubOutbound: it reports the outbound-policy findings in one artefact and refuses, and it has no way to hand back rewritten text at all.

WHY A SECOND DIRECTION, when ScrubOutbound already exists. A scrub is right for text a ROUTINE is about to post: the routine owns that text, nobody has read it yet, and rewriting it is the remedy. A gate judges text a PERSON already wrote — a commit message in a pull request's range, a pull-request body — and rewriting that is not a remedy, it is an edit made on the author's behalf to something already in the history. So this direction returns no text. The absence of a string return is the guarantee: a caller cannot silently rewrite an author's commit message through this door, because the door has no such outlet.

WHY IT REPORTS ONLY THE HARNESS-LEAK CLASS, where the scrub masks everything it finds. Masking more than the policy names is free — the artefact still reads and the extra mask costs the routine nothing. REFUSING more than the policy names is not free: this runs as a required check over every commit message of every pull request, so each extra class is a new way for the gate to go red on text that breaks no stated rule (a commit message quoting a private address is the live example), and a gate that reds on the innocent is a gate somebody switches off. Committed text is judged for the other classes by `abcd lint`'s privacy rule and by the record/docs `harness_leak` rule; this door judges the two shapes a harness stamps onto public text, which is the class OutboundPolicy actually states.

The error is non-nil whenever the artefact is refused, findings or not, so a caller that reads only the error still fails closed.

func ScanText

func ScanText(text string, id Identity, patterns []Pattern, id2sev map[string]Severity, file string) []Finding

ScanText scans text for every secret pattern and identity-derived match, returning findings sorted deterministically. It is pure: identity, patterns and severities are all passed in.

func ScrubOutbound added in v0.6.8

func ScrubOutbound(repoRoot, text, label string) (string, []Finding, error)

ScrubOutbound sanitises one outbound artefact and returns the text to post, the findings that were removed, and a fail-closed error if anything blocking survived.

It is the ScanText → Redact → residual-rescan shape the store-before-commit paths already use (history, memory), with one difference: an attribution FOOTER takes its whole line rather than being masked in place. Masking is right for a secret, where the surrounding text is the artefact's own content; a footer IS the whole line the harness added, and leaving a masked stub behind would post the shape of the thing the policy bans. A session URL is masked like any other span, because it can sit inside a sentence the artefact meant to say.

repoRoot supplies the per-repo scanner config, so a repository that raised a severity in .abcd/config/pii.json is honoured here exactly as in Stage-1 redaction.

func SurvivingCallerHome added in v0.6.9

func SurvivingCallerHome(text, home string) (string, []Finding)

SurvivingCallerHome is the deterministic backstop after SweepCallerHome, with no dependency on the pattern heuristic. It REWRITES what it can and reports what it cannot: a "/Users/<user>" / "/home/<user>" segment for the caller's local username (basename of $HOME) is rewritten to the local_username placeholder wherever the name does not go on — whatever punctuation follows it, and whatever precedes it, since "/Users/me" behind a abcd-audit:allow URL host or under a longer root is still the caller's name — and the $HOME literal standing as a path is reported (defensive: the sweep removes exactly those, so this fires only if the two ever disagree). A backstop that refused the write on a segment it could rewrite stopped every page that quoted the caller's own path; one that rewrites keeps the write and drops the name. Returned findings carry only the kind (masked Matched), enough for a refusal to report without exposing raw material.

func (Finding) MarshalJSON

func (f Finding) MarshalJSON() ([]byte, error)

MarshalJSON redacts the raw secret material before a Finding reaches any serialized surface — the dry-run/ship report that `abcd launch --json` writes to stdout and that CI may archive as a log or artefact. The finding's existence and location (file, line, column, kind, severity, suggested fix) are preserved intact; only the matched token and the line snippet that carries it are masked. Hard-fail counting keys off Severity and is unaffected, so a redacted finding still blocks a ship.

type Identity

type Identity struct {
	GitUserName  string
	GitUserEmail string
	// OtherGitUserNames and OtherGitUserEmails are the caller's OTHER git
	// identities: every user.name / user.email value git resolves for this
	// repository in a scope the effective value displaced — the unconditional
	// global identity under a repo-local persona, or the reverse, or an
	// includeIf persona keyed on where the repository sits — and the
	// GIT_AUTHOR_*/GIT_COMMITTER_* persona the environment sets, which no
	// config listing reports at all. A persona ADDS an identity to redact; it
	// never replaces one (GHSA-v826-5jf4-p8xg, GHSA-gxhr-pmwv-r99p,
	// GHSA-rvhr-3455-c5jw).
	OtherGitUserNames  []string
	OtherGitUserEmails []string
	GitRemoteUsername  string
	// GitRemoteRepo is the repository name of the same remote. With the owner
	// it spells the repository's own owner/repo slug, which is public by
	// construction and is not a github_username finding.
	GitRemoteRepo string
	HomePath      string
	HomeUser      string
}

Identity is the caller's runtime identity, probed from git config and the environment. Its matchers are built at scan time; empty fields disable the corresponding kind.

func ProbeIdentity

func ProbeIdentity(repoRoot string) Identity

ProbeIdentity gathers the caller's identity from git config and $HOME, best-effort: any probe that fails leaves its field empty. repoRoot scopes the git config reads so a per-repo user.name/email is honoured — and honoured in ADDITION to the caller's other identities, not instead of them: the name and email fields hold the value git resolves in this repository, and the Other* fields hold every value another scope configured that it displaced.

type Pattern

type Pattern struct {
	Name     string
	Kind     string
	Label    string
	Re       *regexp.Regexp
	Severity Severity
	Skip     func(match string) bool // nil == no skip
	// SkipAt is the context-aware form of Skip: it receives the whole line and
	// the match's half-open byte span, so a pattern can reject a match by what
	// SURROUNDS it — the thing RE2 cannot express and Skip cannot see. The
	// network patterns need it to tell a host from a filename (".work.local/")
	// and a quad from a longer dotted run ("1.2.3.4.5.6"). nil == no skip.
	SkipAt     func(line string, start, end int) bool
	Suggestion string
}

Pattern is one compiled secret regex plus its metadata. Skip is the RE2 lookaround replacement: when non-nil it is called with the full match and, when it returns true, the match is discarded (mirrors the negative lookaheads the Python patterns used, which RE2 cannot express).

func DefaultPatterns

func DefaultPatterns() []Pattern

DefaultPatterns returns the bundled secret pattern set (spec §2.2), ported verbatim from scripts/abcd/defaults/pii.json, plus the network-identifier set from network.go. Every secret pattern is hard_fail and non-sanitisable. This set is the built-in baseline the merged config layers on top of (the Go analogue of the bundled defaults/pii.json).

func HarnessLeakPatterns added in v0.6.8

func HarnessLeakPatterns() []Pattern

HarnessLeakPatterns returns the canonical harness-leak pattern set. It is exported so the surfaces that judge COMMITTED text — the audit privacy rule and the record/docs lint — can run exactly these two without a second copy, and it is folded into DefaultPatterns so every scanner consumer inherits them.

Both are hard_fail. A session URL is a live handle on a run, and a footer is a policy breach on the one surface (a public forge artefact) whose edit history keeps the pre-scrub revision — there is no reading under which either belongs in public text, so neither is advisory.

func NetworkPatterns

func NetworkPatterns() []Pattern

NetworkPatterns returns the canonical network-identifier pattern set. It is exported so the audit privacy-hygiene rule can run exactly these patterns over committed files without duplicating them, and it is included in DefaultPatterns so every scanner consumer gets the same detection.

Severity: addresses (IPv4/IPv6/MAC) are hard_fail — the reserved ranges make a non-reserved address an authoring error with near-zero ambiguity. The two hostname patterns are shape heuristics rather than range checks, so they are warn: Stage-1 redaction rewrites them either way (Redact acts on every finding), and a repo that wants them blocking can raise the severity through .abcd/config/pii.json, which may raise but never lower a floor.

type ScanResult

type ScanResult struct {
	Findings          []Finding `json:"findings"`
	FilesScanned      int       `json:"files_scanned"`
	HardFails         int       `json:"hard_fails"`
	Unavailable       bool      `json:"unavailable"`
	UnavailableReason string    `json:"unavailable_reason,omitempty"`
	// Unscanned lists bundle files that were present but could NOT be covered:
	// unreadable, over the byte-scan cap, a non-regular or symlinked leaf, or
	// classified binary by the content sniff (e.g. a leading-NUL file) WITHOUT
	// a reviewed skip explaining it. They are the fail-closed coverage gap —
	// the launch gate refuses on them, so a crafted binary cannot smuggle
	// unscanned content into a source bundle (GHSA-5mmm-3whv-3rqp).
	Unscanned []string `json:"unscanned,omitempty"`
	// UnscannedWhy carries, per Unscanned path, the reason it could not be
	// covered, so an asset over the cap is distinguishable from an I/O error.
	UnscannedWhy map[string]string `json:"unscanned_why,omitempty"`
	// ScannedBinary lists bundle files that matched the reviewed skip sets (a
	// binary media extension, a skip filename, or a skip fragment) AND whose
	// name is on the plaintext allow-list (plaintextNames): a skip-listed file
	// known to carry no compressed region, so the byte scan covers all of it.
	// The raw bytes run through the byte rules — every secret rule, the
	// harness-leak rules, and the long-literal identity rules — with no
	// format decoded. A skip exempts a file from the short/generic identity
	// rules that are noise on bytes; it is never an unverified allow, because
	// a file that enters the payload enters it with its bytes, whatever its
	// name says (GHSA-9wv7-88w3-f77m).
	ScannedBinary []string `json:"scanned_binary,omitempty"`
	// ContentUnverified lists every other skip-listed bundle file — the
	// DEFAULT for the byte branch, because a closed list of compressed
	// formats would label whatever it missed as verified. An archive, but
	// equally a PNG (deflate IDAT and zTXt), a JPEG entropy stream, a PDF
	// FlateDecode stream, an mp4 box, a database blob, a packed executable,
	// or any extension a repo's pii.json adds to skip_extensions. They get
	// the same byte scan as ScannedBinary (cheap, and it still catches
	// plaintext such as an uncompressed tar's entries or PNG tEXt metadata),
	// but a compressed region is invisible to it, so they are NOT counted as
	// content-verified and the report says so rather than claiming coverage
	// it does not have. It is what remains AFTER the decoder (container.go)
	// has had its turn: the formats abcd cannot decode, the streams that
	// would not inflate, and the ones a decode bound refused. Every entry
	// carries its reason in ContentUnverifiedWhy and the format detected from
	// its magic bytes in ContentFormat. They do not refuse on their own.
	ContentUnverified []string `json:"content_unverified,omitempty"`
	// ContentDecoded lists skip-listed bundle files whose container format the
	// scanner DECODES (container.go): the archive was opened or the compressed
	// regions inflated, under the decode bounds, and every decoded region was
	// scanned with the same byte rules. A file reaches this list only when the
	// walk could ACCOUNT for the whole of its content — a zip whose entries do
	// not tile it, a tar with bytes after its end marker, a stream with a
	// trailer, an entry the walk could not read, a region only part of which
	// reads as text, a structural field carrying a container signature: each of
	// those stays in ContentUnverified with the reason, because the claim this
	// list makes is that the bytes were read, not that the parts that were read
	// looked fine. The residuals the claim does NOT cover are written down at
	// container.go's coverStructuralField. So "decoded and clean" and "could
	// not be read" are two tiers and never one green (iss-2608291832160371).
	// The rules applied are the byte rules, as everywhere on this branch: a
	// text file inside an archive is scanned as bytes, not with the full
	// prose-and-identity set it would get loose in the payload.
	ContentDecoded []string `json:"content_decoded,omitempty"`
	// ContentUnverifiedWhy carries, per ContentUnverified path, why the content
	// could not be read: no decoder for the detected format, an unrecognised
	// format, a stream that would not inflate, an entry that is itself opaque,
	// or one of the decode bounds (output budget, nesting depth, entry count)
	// refusing a bomb.
	ContentUnverifiedWhy map[string]string `json:"content_unverified_why,omitempty"`
	// ContentFormat carries, per byte-branch path, the format detected from the
	// file's MAGIC BYTES — never its extension, so a zip renamed .png reports
	// "zip" and is decoded as one, which the record names as the defect in the
	// old name-keyed label.
	ContentFormat map[string]string `json:"content_format,omitempty"`
	// FindingsOmitted counts the findings dropped past maxBundleFindings. They
	// are counted in HardFails all the same, so a truncated list never reads
	// as a smaller verdict.
	FindingsOmitted int `json:"findings_omitted,omitempty"`
}

ScanResult is the outcome of scanning a bundle.

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner holds the merged config, compiled patterns and probed identity for a repo. Construct it with New.

func New

func New(repoRoot string) (*Scanner, error)

New builds a Scanner for repoRoot: it starts from the built-in secret set and identity floors, merges the per-repo .abcd/config/pii.json override when present (enforcing the severity floor), and probes identity. If the per-repo config exists but cannot be read or parsed, the scanner is marked unavailable (fail-closed): New still returns a usable value with no error, and ScanBundle surfaces Unavailable=true.

func (*Scanner) NetworkPatterns

func (s *Scanner) NetworkPatterns() []Pattern

NetworkPatterns returns the network-identifier subset of THIS scanner's merged patterns — the built-in set with the repo's .abcd/config/pii.json override applied. A consumer that wants only the network half (the audit privacy-hygiene rule) must come through here rather than through the package-level set, or a repo that raises a pattern's severity, exactly as the set documents it may, sees no effect at the surface that reports it.

func (*Scanner) ScanBundle

func (s *Scanner) ScanBundle(files []BundleFile) (ScanResult, error)

ScanBundle scans the resolved content of every bundle file, reading ResolvedPath and reporting under LogicalPath. A file on the reviewed skip sets (extension, filename, fragment) is read through the guarded, capped primitive and its bytes scanned with the byte rules (scanBytes), reported under ScannedBinary (a plaintext allow-listed name) or ContentUnverified; any other file is sniffed (null byte + UTF-8) and scanned with the full rule set, or surfaced in Unscanned (with UnscannedWhy) when it cannot be. If the scanner is unavailable (config unreadable), it returns Unavailable=true and scans nothing (fail-closed).

func (*Scanner) ScanText

func (s *Scanner) ScanText(text, logicalName string) []Finding

ScanText scans an in-memory string with THIS scanner's merged patterns, probed identity, and per-repo severity floors — the same detection ScanBundle runs on a file's content, but with no filesystem read. It is the entry point a write-time redactor (the history store) uses to find every secret/PII span in a transcript before it lands on disk. logicalName is the label stamped into each finding's File field.

It intentionally exposes the merged config that the package-level ScanText cannot: a caller using the package-level function would bypass the .abcd/config/pii.json override that New folded in.

func (*Scanner) Unavailable

func (s *Scanner) Unavailable() (bool, string)

Unavailable reports whether the scanner is in the fail-closed degraded state (the per-repo config exists but is unreadable, invalid JSON, or carries a bad override regex) and, if so, a human reason. A write-time redactor MUST consult this before trusting ScanText/Redact: unlike ScanBundle, those entry points cannot signal degradation in-band, so a caller that skips this check would sanitise with a silently weakened pattern set. Mirrors ScanBundle's guard.

type Severity

type Severity string

Severity ranks a finding. A per-repo config override may RAISE a bundled pattern's or identity kind's severity but never LOWER it below the built-in default (the non-negotiable floor ported from pii.py's _is_downgrade).

const (
	// SeverityHardFail blocks a ship; a dry-run reports it but still exits 0.
	SeverityHardFail Severity = "hard_fail"
	// SeverityWarn is reported but does not block.
	SeverityWarn Severity = "warn"
	// SeverityInfo is reported quietly and does not block.
	SeverityInfo Severity = "info"
)

Jump to

Keyboard shortcuts

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