Finding
typeFinding is one attested finding. The detail fields (Snippet onward) are filled once, after Attest, by AddDetail.
Value
v1.Finding
Attestation
typeAttestation is a scan result posted by an attester.
Value
v1.Attestation
AuthorReply
typeAuthorReply is an author's response to a Passport.
Value
v1.AuthorReply
record
typerecord holds everything known about one package.
Value
v1.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, directAtRisk int, indirectAtRisk int, unverified int) 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. Score, grade and verdict are computed here from the findings and dependency counts.
- OID
- 07f023…0b13:3
Attest details
getRecord
func(pkgpath string) *v1.record- OID
- 07f023…0b13:5
getRecord details
addToAuthor
func(author .uverse.address, pkgpath string)- OID
- 07f023…0b13:6
addToAuthor details
markRecent
func(pkgpath string)- OID
- 07f023…0b13:7
markRecent details
countProven
func(fs []v1.Finding) int- OID
- 07f023…0b13:8
countProven details
parseFindings
func(s string) []v1.FindingparseFindings validates and decodes the findings argument.
- OID
- 07f023…0b13:9
parseFindings details
isIdent
func(s string) boolisIdent accepts a Go identifier, optionally a method as Type.Method.
- OID
- 07f023…0b13:10
isIdent details
isRuleID
func(s string) bool- OID
- 07f023…0b13:11
isRuleID details
isGnoFile
func(s string) bool- OID
- 07f023…0b13:12
isGnoFile details
isHex64
func(s string) bool- OID
- 07f023…0b13:13
isHex64 details
isToken
func(s string) boolisToken accepts short version strings such as "0.1.0" or "master.1+f0f9c70".
- OID
- 07f023…0b13:14
isToken details
validReportURI
func(s string) bool- OID
- 07f023…0b13: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
- 07f023…0b13:16
Badge details
verdictColor
func(v string) string- OID
- 07f023…0b13:18
verdictColor details
verdictWords
func(v string) string- OID
- 07f023…0b13:19
verdictWords details
admin
.uverse.addressValue
<gnolang.StringValue>
attesters
*v0.Tree// address -> true
- OID
- 07f023…0b13:22
attesters details
selfPath
stringValue
"gno.land/r/g19wmd95cwm3s0w0c5592tgu3zh4zgrtlggvugnj/bouncer/v1"
requests
*v0.Tree// request id -> \*request
- OID
- 07f023…0b13:26
requests details
openByRequester
*v0.Tree// address -> request id (one open each)
- OID
- 07f023…0b13:29
openByRequester details
openRequests
*v0.Tree// request id -> true, open ones only
- OID
- 07f023…0b13:32
openRequests details
requestID
v0.IDValue
<zero>
records
*v0.Tree// pkgpath -> \*record
- OID
- 07f023…0b13:36
records details
byAuthor
*v0.Tree// author address -> \*avl.Tree (pkgpath -> true)
- OID
- 07f023…0b13:39
byAuthor details
attestationID
v0.IDValue
<zero>
recent
[]string// pkgpaths, most recently attested first
- OID
- 07f023…0b13:189
recent details
disputes
*v0.Tree// dispute id -> \*dispute
- OID
- 07f023…0b13:44
disputes details
disputeID
v0.IDValue
<zero>
totalFindings
intValue
1
totalProven
intValue
1
init.39
func()- OID
- 07f023…0b13:49
init.39 details
assertAdmin
func()- OID
- 07f023…0b13:51
assertAdmin details
assertAttester
func() .uverse.address- OID
- 07f023…0b13:52
assertAttester details
AddAttester
func(addr .uverse.address)AddAttester allows addr to post attestations.
- OID
- 07f023…0b13:53
AddAttester details
RemoveAttester
func(addr .uverse.address)RemoveAttester revokes addr. Its past attestations stay on record.
- OID
- 07f023…0b13:54
RemoveAttester details
TransferAdmin
func(next .uverse.address)TransferAdmin hands the admin role to next.
- OID
- 07f023…0b13:55
TransferAdmin details
Admin
func() .uverse.address- OID
- 07f023…0b13:56
Admin details
IsAttester
func(addr .uverse.address) boolIsAttester reports whether addr may post attestations.
- OID
- 07f023…0b13:57
IsAttester details
Attesters
func() [].uverse.address- OID
- 07f023…0b13: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
- 07f023…0b13:59
validPkgPath details
authorOf
func(pkgpath string) (.uverse.address, bool)- OID
- 07f023…0b13:60
authorOf 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
- 07f023…0b13:61
AddDetail details
detailBytes
func(fs []v1.Finding) int- OID
- 07f023…0b13:63
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
- 07f023…0b13:64
checkText details
DisputeRecord
typeDisputeRecord is a challenge to an attestation, backed by a different report.
Value
v1.DisputeRecord
dispute
typeValue
v1.dispute
disputeKey
func(id uint64) string- OID
- 07f023…0b13:65
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
- 07f023…0b13:67
Dispute details
ResolveDispute
func(id uint64, resolution string)ResolveDispute closes a dispute with a resolution note. Admin or an attester.
- OID
- 07f023…0b13:68
ResolveDispute details
hasOpenDispute
func(pkgpath string, filer .uverse.address) bool- OID
- 07f023…0b13:69
hasOpenDispute details
DisputesFor
func(pkgpath string) []v1.DisputeRecordDisputesFor returns copies of every dispute on pkgpath, oldest first.
- OID
- 07f023…0b13:70
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
- 07f023…0b13:71
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
v1.Guidance
RuleGuidance
func(rule string) (v1.Guidance, bool)RuleGuidance returns the guidance for rule, and false for a rule this realm has no guidance for yet.
- OID
- 07f023…0b13:72
RuleGuidance details
copyAttestation
func(a v1.Attestation) v1.AttestationcopyAttestation returns a deep copy (the Findings slice is copied too).
- OID
- 07f023…0b13:74
copyAttestation details
Latest
func(pkgpath string) (v1.Attestation, bool)Latest returns the newest attestation for pkgpath.
- OID
- 07f023…0b13:76
Latest details
History
func(pkgpath string) []v1.AttestationHistory returns every attestation for pkgpath, oldest first.
- OID
- 07f023…0b13:77
History details
Replies
func(pkgpath string) []v1.AuthorReplyReplies returns the author's replies on pkgpath, oldest first.
- OID
- 07f023…0b13:78
Replies details
Score
func(pkgpath string) (int, bool)Score returns the latest score for pkgpath.
- OID
- 07f023…0b13:79
Score details
ByAuthor
func(addr .uverse.address) []stringByAuthor returns the attested packages in addr's namespace, sorted.
- OID
- 07f023…0b13:80
ByAuthor details
Policy
typePolicy is an integration policy for Check. The zero value is the most conservative: no PROVEN findings, no open disputes, any score.
Value
v1.Policy
Strict
func() v1.PolicyStrict: score 90 or more, no PROVEN findings, every dependency verified, no open disputes.
- OID
- 07f023…0b13:81
Strict details
Standard
func() v1.PolicyStandard: score 75 or more and no PROVEN Critical.
- OID
- 07f023…0b13:82
Standard details
Custom
func(minScore int) v1.PolicyCustom starts a policy at minScore that is otherwise as strict as the zero value; loosen it with the With methods: bouncer.Custom(60).WithProvenOther().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
- 07f023…0b13:83
Custom details
Check
func(pkgpath string, p v1.Policy) boolCheck reports whether the latest attestation of pkgpath satisfies p. An unattested package never passes.
- OID
- 07f023…0b13:84
Check details
Render
func(path string) stringRender serves the Tavern pages: "" Noticeboard "realm/<pkgpath>" Passport
- OID
- 07f023…0b13:85
Render details
webPath
func() stringwebPath is this realm's gnoweb URL path ("/r/...").
- OID
- 07f023…0b13:87
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
- 07f023…0b13:88
passportLink details
verdictText
func(v string) string- OID
- 07f023…0b13:89
verdictText details
date
func(unix int64) string- OID
- 07f023…0b13:90
date details
renderNoticeboard
func() string- OID
- 07f023…0b13:91
renderNoticeboard details
renderPassport
func(pkgpath string) string- OID
- 07f023…0b13:92
renderPassport details
location
func(f v1.Finding) stringlocation is "file:line in Func".
- OID
- 07f023…0b13:93
location details
renderFinding
func(b *strings.Builder, n int, f v1.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
- 07f023…0b13:94
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
- 07f023…0b13:95
renderVersions details
latestSuccessor
func(rec *v1.record) stringlatestSuccessor returns the newest successor an author named.
- OID
- 07f023…0b13:96
latestSuccessor details
diffFindings
func(prev []v1.Finding, next []v1.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
- 07f023…0b13:97
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
- 07f023…0b13:98
reportURL details
Request
typeRequest is a scan request, as returned by reads.
Value
v1.Request
request
typeValue
v1.request
requestKey
func(id uint64) string- OID
- 07f023…0b13:99
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
- 07f023…0b13:101
RequestScan details
CancelRequest
func()CancelRequest withdraws the caller's open request.
- OID
- 07f023…0b13:102
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
- 07f023…0b13:103
CloseRequest details
finishRequest
func(id uint64, status string, note string)- OID
- 07f023…0b13:104
finishRequest details
closeRequestsFor
func(pkgpath string)closeRequestsFor marks every open request for pkgpath as attested.
- OID
- 07f023…0b13:105
closeRequestsFor details
GetRequest
func(id uint64) (v1.Request, bool)GetRequest returns a copy of request id.
- OID
- 07f023…0b13:106
GetRequest details
OpenRequests
func(limit int) []v1.RequestOpenRequests returns up to limit open requests, oldest first, for the scanner bot.
- OID
- 07f023…0b13:107
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
- 07f023…0b13:108
OpenRequestsText details
LatestHashes
func(pkgpath string) stringLatestHashes returns "\<source hash> \<rule-set hash>" of pkgpath's latest attestation, or "" if there is none, so the bot can skip unchanged code.
- OID
- 07f023…0b13:109
LatestHashes 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 counts dependency trust for an attestation.
Value
v1.Deps
computeScore
func(fs []v1.Finding, d v1.Deps) intcomputeScore applies the formula: start at 100, deduct, floor at 0.
- OID
- 07f023…0b13:110
computeScore details
gradeOf
func(score int) string- OID
- 07f023…0b13:112
gradeOf details
verdictOf
func(fs []v1.Finding) string- OID
- 07f023…0b13:113
verdictOf details
ScoreFor
func(fs []v1.Finding, d v1.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
- 07f023…0b13:114
ScoreFor details
families
*v0.Tree// base path -> \*avl.Tree (zero-padded N -> pkgpath)
- OID
- 07f023…0b13:116
families details
familyOf
func(pkgpath string) (base string, n int, ok bool)familyOf splits ".../name/vN" into its base and N.
- OID
- 07f023…0b13:118
familyOf details
versionKey
func(n int) string- OID
- 07f023…0b13:120
versionKey details
addToFamily
func(pkgpath string)- OID
- 07f023…0b13:121
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
- 07f023…0b13:122