Finding
typeFinding is one attested finding. The detail fields (Snippet onward) are filled once, after Attest, by AddDetail.
Value
v2.Finding
Attestation
typeAttestation is a scan result posted by an attester.
Value
v2.Attestation
AuthorReply
typeAuthorReply is an author's response to a Passport.
Value
v2.AuthorReply
record
typerecord holds everything known about one package.
Value
v2.record
maxFindings
untyped bigintValue
(64 <untyped> bigint)
maxHistory
untyped bigintValue
(50 <untyped> bigint)
maxReplies
untyped bigintValue
(20 <untyped> bigint)
maxNoteLen
untyped bigintValue
(280 <untyped> bigint)
maxRecent
untyped bigintValue
(10 <untyped> bigint)
Attest
func(pkgpath string, sourceHash string, scannerVersion string, rulesetHash string, toolchain string, reportHash string, reportURI string, findings string, deps string) uint64Attest records a scan result for pkgpath. Attesters only. findings is a ";"-separated list of "RULE,severity,LABEL,file,line\[,func]" entries ("" for none), in the report's order. deps is the import tree (see parseDeps). Score, grade and verdict are computed here from the findings and the dependencies' statuses in this registry.
- OID
- 02af53…729f:3
Attest details
getRecord
func(pkgpath string) *v2.record- OID
- 02af53…729f:5
getRecord details
addToAuthor
func(author .uverse.address, pkgpath string)- OID
- 02af53…729f:6
addToAuthor details
markRecent
func(pkgpath string)- OID
- 02af53…729f:7
markRecent details
countProven
func(fs []v2.Finding) int- OID
- 02af53…729f:8
countProven details
parseFindings
func(s string) []v2.FindingparseFindings validates and decodes the findings argument.
- OID
- 02af53…729f:9
parseFindings details
isIdent
func(s string) boolisIdent accepts a Go identifier, optionally a method as Type.Method.
- OID
- 02af53…729f:10
isIdent details
isRuleID
func(s string) bool- OID
- 02af53…729f:11
isRuleID details
isGnoFile
func(s string) bool- OID
- 02af53…729f:12
isGnoFile details
isHex64
func(s string) bool- OID
- 02af53…729f:13
isHex64 details
isToken
func(s string) boolisToken accepts short version strings such as "0.1.0" or "master.1+f0f9c70".
- OID
- 02af53…729f:14
isToken details
validReportURI
func(s string) bool- OID
- 02af53…729f:15
validReportURI details
Badge
func(pkgpath string) stringBadge returns a Markdown image of pkgpath's live Bouncer badge (grade, score and attestation date), linked to its Passport. A realm shows it by adding one line to its Render: out += bouncer.Badge("gno.land/r/<address>/myrealm") The color follows the verdict, not the grade: a package with a PROVEN High finding is red even at grade B.
- OID
- 02af53…729f:16
Badge details
verdictColor
func(v string) string- OID
- 02af53…729f:18
verdictColor details
verdictWords
func(v string) string- OID
- 02af53…729f:19
verdictWords details
admin
.uverse.addressValue
<gnolang.StringValue>
attesters
*v0.Tree// address -> true
- OID
- 02af53…729f:22
attesters details
selfPath
stringValue
"gno.land/r/g19wmd95cwm3s0w0c5592tgu3zh4zgrtlggvugnj/bouncer/v2"
requests
*v0.Tree// request id -> \*request
- OID
- 02af53…729f:26
requests details
openByRequester
*v0.Tree// address -> request id (one open each)
- OID
- 02af53…729f:29
openByRequester details
openRequests
*v0.Tree// request id -> true, open ones only
- OID
- 02af53…729f:32
openRequests details
requestID
v0.IDValue
<zero>
records
*v0.Tree// pkgpath -> \*record
- OID
- 02af53…729f:36
records details
byAuthor
*v0.Tree// author address -> \*avl.Tree (pkgpath -> true)
- OID
- 02af53…729f:39
byAuthor details
attestationID
v0.IDValue
<zero>
recent
[]string// pkgpaths, most recently attested first
- OID
- 02af53…729f:405
recent details
disputes
*v0.Tree// dispute id -> \*dispute
- OID
- 02af53…729f:44
disputes details
disputeID
v0.IDValue
<zero>
totalFindings
intValue
1
totalProven
intValue
1
init.39
func()- OID
- 02af53…729f:49
init.39 details
assertAdmin
func()- OID
- 02af53…729f:51
assertAdmin details
assertAttester
func() .uverse.address- OID
- 02af53…729f:52
assertAttester details
AddAttester
func(addr .uverse.address)AddAttester allows addr to post attestations.
- OID
- 02af53…729f:53
AddAttester details
RemoveAttester
func(addr .uverse.address)RemoveAttester revokes addr. Its past attestations stay on record.
- OID
- 02af53…729f:54
RemoveAttester details
TransferAdmin
func(next .uverse.address)TransferAdmin hands the admin role to next.
- OID
- 02af53…729f:55
TransferAdmin details
Admin
func() .uverse.address- OID
- 02af53…729f:56
Admin details
IsAttester
func(addr .uverse.address) boolIsAttester reports whether addr may post attestations.
- OID
- 02af53…729f:57
IsAttester details
Attesters
func() [].uverse.address- OID
- 02af53…729f:58
Attesters details
maxPkgPathLen
untyped bigintValue
(200 <untyped> bigint)
validPkgPath
func(p string) boolvalidPkgPath accepts gno.land/r/... and gno.land/p/... paths of at least a namespace and a name, made of lowercase letters, digits and underscores.
- OID
- 02af53…729f:59
validPkgPath details
authorOf
func(pkgpath string) (.uverse.address, bool)- OID
- 02af53…729f:60
authorOf details
DepVerified
untyped stringDependency statuses.
Value
"verified"
DepAtRisk
untyped stringDependency statuses.
Value
"at-risk"
DepUnverified
untyped stringDependency statuses.
Value
"unverified"
maxDeps
untyped bigintValue
(200 <untyped> bigint)
Dep
typeDep is one dependency of an attested package. Status is filled in when the attestation is read.
Value
v2.Dep
DepStatus
func(pkgpath string) stringDepStatus returns the trust status of pkgpath as a dependency.
- OID
- 02af53…729f:61
DepStatus details
parseDeps
func(pkgpath string, s string) []v2.DepparseDeps decodes Attest's deps argument: ";"-separated "d,\<pkgpath>" (direct) or "i,\<pkgpath>" (indirect) entries, "" for none.
- OID
- 02af53…729f:63
parseDeps details
live
func(a v2.Attestation) v2.Attestationlive returns a copy of a with dependency statuses, counts, score and grade as they stand now. The verdict depends on the findings only.
- OID
- 02af53…729f:64
live details
maxSnippetLen
untyped bigintSize limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.
Value
(1500 <untyped> bigint)
maxAttackLen
untyped bigintSize limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.
Value
(200 <untyped> bigint)
maxExploitLen
untyped bigintSize limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.
Value
(6000 <untyped> bigint)
maxEvidenceLen
untyped bigintSize limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.
Value
(1500 <untyped> bigint)
maxDetailBytes
untyped bigintSize limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.
Value
(32000 <untyped> bigint)
AddDetail
func(pkgpath string, id uint64, index int, snippet string, attack string, exploit string, before string, after string)AddDetail attaches the vulnerable snippet and, for a PROVEN finding, the exploit and its evidence to finding index of attestation id. Only the attester who posted the attestation may call it, once per finding: the details are as permanent as the attestation itself.
- OID
- 02af53…729f:65
AddDetail details
detailBytes
func(fs []v2.Finding) int- OID
- 02af53…729f:67
detailBytes details
checkText
func(name string, s string, max int)checkText rejects text that is too long, not UTF-8, or carries NUL or other control characters besides tab and newline.
- OID
- 02af53…729f:68
checkText details
DisputeRecord
typeDisputeRecord is a challenge to an attestation, backed by a different report.
Value
v2.DisputeRecord
dispute
typeValue
v2.dispute
disputeKey
func(id uint64) string- OID
- 02af53…729f:69
disputeKey details
Dispute
func(pkgpath string, reportHash string, note string) uint64Dispute files a challenge against the latest attestation of pkgpath, backed by a report with a different hash. One open dispute per filer per package.
- OID
- 02af53…729f:71
Dispute details
ResolveDispute
func(id uint64, resolution string)ResolveDispute closes a dispute with a resolution note. Admin or an attester.
- OID
- 02af53…729f:72
ResolveDispute details
hasOpenDispute
func(pkgpath string, filer .uverse.address) bool- OID
- 02af53…729f:73
hasOpenDispute details
DisputesFor
func(pkgpath string) []v2.DisputeRecordDisputesFor returns copies of every dispute on pkgpath, oldest first.
- OID
- 02af53…729f:74
DisputesFor details
Reply
func(pkgpath string, note string, successor string)Reply lets the author of an address-namespace package answer its Passport and, optionally, name the fixed version (successor) in the same namespace.
- OID
- 02af53…729f:75
Reply details
Guidance
typeGuidance is the fix guidance for one rule. It is written once per rule, so every Passport says the same thing and it costs nothing per finding.
Value
v2.Guidance
RuleGuidance
func(rule string) (v2.Guidance, bool)RuleGuidance returns the guidance for rule, and false for a rule this realm has no guidance for yet.
- OID
- 02af53…729f:76
RuleGuidance details
copyAttestation
func(a v2.Attestation) v2.AttestationcopyAttestation returns a deep copy (the Findings slice is copied too).
- OID
- 02af53…729f:78
copyAttestation details
Latest
func(pkgpath string) (v2.Attestation, bool)Latest returns the newest attestation for pkgpath.
- OID
- 02af53…729f:80
Latest details
History
func(pkgpath string) []v2.AttestationHistory returns every attestation for pkgpath, oldest first, with scores that use the current dependency statuses (like Latest).
- OID
- 02af53…729f:81
History details
Replies
func(pkgpath string) []v2.AuthorReplyReplies returns the author's replies on pkgpath, oldest first.
- OID
- 02af53…729f:82
Replies details
Score
func(pkgpath string) (int, bool)Score returns the latest score for pkgpath.
- OID
- 02af53…729f:83
Score details
ByAuthor
func(addr .uverse.address) []stringByAuthor returns the attested packages in addr's namespace, sorted.
- OID
- 02af53…729f:84
ByAuthor details
Policy
typePolicy is an integration policy for Check. No policy accepts a red verdict: a PROVEN Critical or High finding fails every policy, and there is no option to allow it. The zero value is the most conservative: no PROVEN findings at all, no open disputes, any score.
Value
v2.Policy
Strict
func() v2.PolicyStrict: score 90 or more, no PROVEN findings, every dependency verified, no open disputes.
- OID
- 02af53…729f:85
Strict details
Standard
func() v2.PolicyStandard: score 75 or more and no PROVEN Critical or High finding. Open disputes are tolerated.
- OID
- 02af53…729f:86
Standard details
Custom
func(minScore int) v2.PolicyCustom starts a policy at minScore that is otherwise as strict as the zero value; loosen it with the With methods: bouncer.Custom(60).WithProvenMedium().WithOpenDisputes() Other realms must build policies this way: the VM refuses to allocate a Bouncer type in a foreign realm, so a bouncer.Policy{...} literal written in another realm panics.
- OID
- 02af53…729f:87
Custom details
Check
func(pkgpath string, p v2.Policy) boolCheck reports whether the latest attestation of pkgpath satisfies p. An unattested package never passes.
- OID
- 02af53…729f:88
Check details
allows
func(p v2.Policy, score int, fs []v2.Finding, d v2.Deps) boolallows is the policy decision on a score, findings and dependency counts (disputes aside). bouncer gate's Go copy (internal/score) must decide the same; TestMatchesRealm checks it.
- OID
- 02af53…729f:89
allows details
Render
func(path string) stringRender serves the Tavern pages: "" Noticeboard "realm/<pkgpath>" Passport "hunters" link to the Training Grounds hunters board
- OID
- 02af53…729f:90
Render details
groundsWebPath
func() stringgroundsWebPath is the Training Grounds' gnoweb path: "grounds" next to this realm's /vN, in the same namespace.
- OID
- 02af53…729f:92
groundsWebPath details
webPath
func() stringwebPath is this realm's gnoweb URL path ("/r/...").
- OID
- 02af53…729f:93
webPath details
passportLink
func(pkgpath string) stringpassportLink links to pkgpath's Passport. pkgpath is a validated path (lowercase letters, digits, underscores and slashes), so it is URL-safe.
- OID
- 02af53…729f:94
passportLink details
verdictText
func(v string) string- OID
- 02af53…729f:95
verdictText details
date
func(unix int64) string- OID
- 02af53…729f:96
date details
renderNoticeboard
func() string- OID
- 02af53…729f:97
renderNoticeboard details
renderPassport
func(pkgpath string) string- OID
- 02af53…729f:98
renderPassport details
location
func(f v2.Finding) stringlocation is "file:line in Func".
- OID
- 02af53…729f:99
location details
renderFinding
func(b *strings.Builder, n int, f v2.Finding)renderFinding writes one finding: what it means, why it is dangerous, the vulnerable code, the fix and why it works, and the exploit if PROVEN.
- OID
- 02af53…729f:100
renderFinding details
renderVersions
func(b *strings.Builder, pkgpath string)renderVersions lists every attested version of the package, newest first, with what changed from the version before it.
- OID
- 02af53…729f:101
renderVersions details
latestSuccessor
func(rec *v2.record) stringlatestSuccessor returns the newest successor an author named.
- OID
- 02af53…729f:102
latestSuccessor details
diffFindings
func(prev []v2.Finding, next []v2.Finding) stringdiffFindings describes which rules disappeared or appeared between two scans. A rule that was PROVEN and is gone is "resolved"; a warning that is gone is only "no longer detected", since a missing warning proves nothing.
- OID
- 02af53…729f:103
diffFindings details
reportURL
func(uri string) stringreportURL turns a stored report URI into a safe link target. IPFS URIs go through the IPFS gateway gnoweb itself uses, since links need https.
- OID
- 02af53…729f:104
reportURL details
renderDeps
func(b *strings.Builder, d v2.Deps)renderDeps shows dependency trust as it stands now, direct first.
- OID
- 02af53…729f:105
renderDeps details
depStatusText
func(s string) string- OID
- 02af53…729f:106
depStatusText details
Request
typeRequest is a scan request, as returned by reads.
Value
v2.Request
request
typeValue
v2.request
requestKey
func(id uint64) string- OID
- 02af53…729f:107
requestKey details
RequestScan
func(pkgpath string) uint64RequestScan asks the scanner bot to scan pkgpath. Each address may have one open request at a time.
- OID
- 02af53…729f:109
RequestScan details
CancelRequest
func()CancelRequest withdraws the caller's open request.
- OID
- 02af53…729f:110
CancelRequest details
CloseRequest
func(id uint64, note string)CloseRequest lets an attester close a request it cannot serve, such as a package that does not exist.
- OID
- 02af53…729f:111
CloseRequest details
finishRequest
func(id uint64, status string, note string)- OID
- 02af53…729f:112
finishRequest details
closeRequestsFor
func(pkgpath string)closeRequestsFor marks every open request for pkgpath as attested.
- OID
- 02af53…729f:113
closeRequestsFor details
GetRequest
func(id uint64) (v2.Request, bool)GetRequest returns a copy of request id.
- OID
- 02af53…729f:114
GetRequest details
OpenRequests
func(limit int) []v2.RequestOpenRequests returns up to limit open requests, oldest first, for the scanner bot.
- OID
- 02af53…729f:115
OpenRequests details
OpenRequestsText
func(limit int) stringOpenRequestsText is OpenRequests for the scanner bot, as plain text: one "id pkgpath" line per open request, oldest first. Package paths never contain spaces or newlines.
- OID
- 02af53…729f:116
OpenRequestsText details
LatestHashes
func(pkgpath string) stringLatestHashes returns "\<source hash> \<rule-set hash> \<scanner version>" of pkgpath's latest attestation, or "" if there is none, so the bot can skip code it already scanned with the same rules and prover.
- OID
- 02af53…729f:117
LatestHashes details
APIVersion
func() intAPIVersion is the registry's interface version, so the bot can tell what Attest takes. 2: Attest takes the dependency list (deps.gno); LatestHashes includes the scanner version.
- OID
- 02af53…729f:118
APIVersion details
LabelProven
untyped stringLabels, exactly as the prover writes them.
Value
"PROVEN"
LabelNotReproduced
untyped stringLabels, exactly as the prover writes them.
Value
"NOT REPRODUCED"
LabelStaticWarning
untyped stringLabels, exactly as the prover writes them.
Value
"STATIC WARNING"
SeverityCritical
untyped stringSeverities.
Value
"critical"
SeverityHigh
untyped stringSeverities.
Value
"high"
SeverityMedium
untyped stringSeverities.
Value
"medium"
VerdictNotRecommended
untyped string// any PROVEN Critical or High
Value
"not-recommended"
VerdictReview
untyped string// any Critical or High warning
Value
"review"
VerdictClear
untyped string// no known Critical or High issues
Value
"clear"
Disclaimer
untyped stringDisclaimer is shown on every Passport.
Value
"A high score means Bouncer found no issues with its current rules. It is not a guarantee of safety."
Deps
typeDeps is an attestation's dependency trust: the list as attested, and the counts that the score uses. Counts and statuses are computed when the attestation is read (see live).
Value
v2.Deps
computeScore
func(fs []v2.Finding, d v2.Deps) intcomputeScore applies the formula: start at 100, deduct, floor at 0.
- OID
- 02af53…729f:119
computeScore details
gradeOf
func(score int) string- OID
- 02af53…729f:121
gradeOf details
verdictOf
func(fs []v2.Finding) string- OID
- 02af53…729f:122
verdictOf details
ScoreFor
func(fs []v2.Finding, d v2.Deps) (score int, grade string, verdict string)ScoreFor exposes the formula, so anyone can check an attestation or score a report before attesting it.
- OID
- 02af53…729f:123
ScoreFor details
families
*v0.Tree// base path -> \*avl.Tree (zero-padded N -> pkgpath)
- OID
- 02af53…729f:125
families details
familyOf
func(pkgpath string) (base string, n int, ok bool)familyOf splits ".../name/vN" into its base and N.
- OID
- 02af53…729f:127
familyOf details
versionKey
func(n int) string- OID
- 02af53…729f:129
versionKey details
addToFamily
func(pkgpath string)- OID
- 02af53…729f:130
addToFamily details
Versions
func(pkgpath string) []stringVersions returns every attested version of pkgpath's package, oldest first. A path without a /vN suffix is its own only version.
- OID
- 02af53…729f:131