Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v1 state

Back to all declarations

Finding

type

Finding is one attested finding. The detail fields (Snippet onward) are filled once, after Attest, by AddDetail.

Value

v1.Finding

Attestation

type

Attestation is a scan result posted by an attester.

Value

v1.Attestation

AuthorReply

type

AuthorReply is an author's response to a Passport.

Value

v1.AuthorReply

record

type

record holds everything known about one package.

Value

v1.record

maxFindings

untyped bigint

Value

(64 <untyped> bigint)

maxHistory

untyped bigint

Value

(50 <untyped> bigint)

maxReplies

untyped bigint

Value

(20 <untyped> bigint)

maxNoteLen

untyped bigint

Value

(280 <untyped> bigint)

maxRecent

untyped bigint

Value

(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) uint64

Attest 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.

Open
OID
07f023…0b13:3
Attest details

Inspect func

getRecord

func(pkgpath string) *v1.record
Open
OID
07f023…0b13:5
getRecord details

Inspect func

addToAuthor

func(author .uverse.address, pkgpath string)
Open
OID
07f023…0b13:6
addToAuthor details

Inspect func

markRecent

func(pkgpath string)
Open
OID
07f023…0b13:7
markRecent details

Inspect func

countProven

func(fs []v1.Finding) int
Open
OID
07f023…0b13:8
countProven details

Inspect func

parseFindings

func(s string) []v1.Finding

parseFindings validates and decodes the findings argument.

Open
OID
07f023…0b13:9
parseFindings details

Inspect func

isIdent

func(s string) bool

isIdent accepts a Go identifier, optionally a method as Type.Method.

Open
OID
07f023…0b13:10
isIdent details

Inspect func

isToken

func(s string) bool

isToken accepts short version strings such as "0.1.0" or "master.1+f0f9c70".

Open
OID
07f023…0b13:14
isToken details

Inspect func

validReportURI

func(s string) bool
Open
OID
07f023…0b13:15
validReportURI details

Inspect func

Badge

func(pkgpath string) string

Badge 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.

Open
OID
07f023…0b13:16
Badge details

Inspect func

verdictColor

func(v string) string
Open
OID
07f023…0b13:18
verdictColor details

Inspect func

verdictWords

func(v string) string
Open
OID
07f023…0b13:19
verdictWords details

Inspect func

admin

.uverse.address

Value

<gnolang.StringValue>

selfPath

string

Value

"gno.land/r/g19wmd95cwm3s0w0c5592tgu3zh4zgrtlggvugnj/bouncer/v1"

requests

*v0.Tree

// request id -> \*request

Open
OID
07f023…0b13:26
requests details

Inspect pointer

openByRequester

*v0.Tree

// address -> request id (one open each)

Open
OID
07f023…0b13:29
openByRequester details

Inspect pointer

openRequests

*v0.Tree

// request id -> true, open ones only

Open
OID
07f023…0b13:32
openRequests details

Inspect pointer

requestID

v0.ID

Value

<zero>

byAuthor

*v0.Tree

// author address -> \*avl.Tree (pkgpath -> true)

Open
OID
07f023…0b13:39
byAuthor details

Inspect pointer

attestationID

v0.ID

Value

<zero>

recent

[]string (len=2)

// pkgpaths, most recently attested first

Open
OID
07f023…0b13:189
recent details (len=2)

+2 more Inspect slice

disputes

*v0.Tree

// dispute id -> \*dispute

Open
OID
07f023…0b13:44
disputes details

Inspect pointer

disputeID

v0.ID

Value

<zero>

totalFindings

int

Value

1

totalProven

int

Value

1

assertAttester

func() .uverse.address
Open
OID
07f023…0b13:52
assertAttester details

Inspect func

AddAttester

func(addr .uverse.address)

AddAttester allows addr to post attestations.

Open
OID
07f023…0b13:53
AddAttester details

Inspect func

RemoveAttester

func(addr .uverse.address)

RemoveAttester revokes addr. Its past attestations stay on record.

Open
OID
07f023…0b13:54
RemoveAttester details

Inspect func

TransferAdmin

func(next .uverse.address)

TransferAdmin hands the admin role to next.

Open
OID
07f023…0b13:55
TransferAdmin details

Inspect func

IsAttester

func(addr .uverse.address) bool

IsAttester reports whether addr may post attestations.

Open
OID
07f023…0b13:57
IsAttester details

Inspect func

Attesters

func() [].uverse.address
Open
OID
07f023…0b13:58
Attesters details

Inspect func

maxPkgPathLen

untyped bigint

Value

(200 <untyped> bigint)

validPkgPath

func(p string) bool

validPkgPath accepts gno.land/r/... and gno.land/p/... paths of at least a namespace and a name, made of lowercase letters, digits and underscores.

Open
OID
07f023…0b13:59
validPkgPath details

Inspect func

authorOf

func(pkgpath string) (.uverse.address, bool)
Open
OID
07f023…0b13:60
authorOf details

Inspect func

maxSnippetLen

untyped bigint

Size limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.

Value

(1500 <untyped> bigint)

maxAttackLen

untyped bigint

Size limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.

Value

(200 <untyped> bigint)

maxExploitLen

untyped bigint

Size limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.

Value

(6000 <untyped> bigint)

maxEvidenceLen

untyped bigint

Size limits for finding details. The full report (ReportURI) has everything; the Passport shows what fits here.

Value

(1500 <untyped> bigint)

maxDetailBytes

untyped bigint

Size 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.

Open
OID
07f023…0b13:61
AddDetail details

Inspect func

detailBytes

func(fs []v1.Finding) int
Open
OID
07f023…0b13:63
detailBytes details

Inspect func

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.

Open
OID
07f023…0b13:64
checkText details

Inspect func

DisputeRecord

type

DisputeRecord is a challenge to an attestation, backed by a different report.

Value

v1.DisputeRecord

dispute

type

Value

v1.dispute

disputeKey

func(id uint64) string
Open
OID
07f023…0b13:65
disputeKey details

Inspect func

Dispute

func(pkgpath string, reportHash string, note string) uint64

Dispute files a challenge against the latest attestation of pkgpath, backed by a report with a different hash. One open dispute per filer per package.

Open
OID
07f023…0b13:67
Dispute details

Inspect func

ResolveDispute

func(id uint64, resolution string)

ResolveDispute closes a dispute with a resolution note. Admin or an attester.

Open
OID
07f023…0b13:68
ResolveDispute details

Inspect func

hasOpenDispute

func(pkgpath string, filer .uverse.address) bool
Open
OID
07f023…0b13:69
hasOpenDispute details

Inspect func

DisputesFor

func(pkgpath string) []v1.DisputeRecord

DisputesFor returns copies of every dispute on pkgpath, oldest first.

Open
OID
07f023…0b13:70
DisputesFor details

Inspect func

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.

Open
OID
07f023…0b13:71
Reply details

Inspect func

Guidance

type

Guidance 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.

Open
OID
07f023…0b13:72
RuleGuidance details

Inspect func

copyAttestation

func(a v1.Attestation) v1.Attestation

copyAttestation returns a deep copy (the Findings slice is copied too).

Open
OID
07f023…0b13:74
copyAttestation details

Inspect func

Latest

func(pkgpath string) (v1.Attestation, bool)

Latest returns the newest attestation for pkgpath.

Open
OID
07f023…0b13:76
Latest details

Inspect func

History

func(pkgpath string) []v1.Attestation

History returns every attestation for pkgpath, oldest first.

Open
OID
07f023…0b13:77
History details

Inspect func

Replies

func(pkgpath string) []v1.AuthorReply

Replies returns the author's replies on pkgpath, oldest first.

Open
OID
07f023…0b13:78
Replies details

Inspect func

Score

func(pkgpath string) (int, bool)

Score returns the latest score for pkgpath.

Open
OID
07f023…0b13:79
Score details

Inspect func

ByAuthor

func(addr .uverse.address) []string

ByAuthor returns the attested packages in addr's namespace, sorted.

Open
OID
07f023…0b13:80
ByAuthor details

Inspect func

Policy

type

Policy 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.Policy

Strict: score 90 or more, no PROVEN findings, every dependency verified, no open disputes.

Open
OID
07f023…0b13:81
Strict details

Inspect func

Standard

func() v1.Policy

Standard: score 75 or more and no PROVEN Critical.

Open
OID
07f023…0b13:82
Standard details

Inspect func

Custom

func(minScore int) v1.Policy

Custom 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.

Open
OID
07f023…0b13:83
Custom details

Inspect func

Check

func(pkgpath string, p v1.Policy) bool

Check reports whether the latest attestation of pkgpath satisfies p. An unattested package never passes.

Open
OID
07f023…0b13:84
Check details

Inspect func

Render

func(path string) string

Render serves the Tavern pages: "" Noticeboard "realm/<pkgpath>" Passport

Open
OID
07f023…0b13:85
Render details

Inspect func

webPath

func() string

webPath is this realm's gnoweb URL path ("/r/...").

Open
OID
07f023…0b13:87
webPath details

Inspect func

verdictText

func(v string) string
Open
OID
07f023…0b13:89
verdictText details

Inspect func

renderNoticeboard

func() string
Open
OID
07f023…0b13:91
renderNoticeboard details

Inspect func

renderPassport

func(pkgpath string) string
Open
OID
07f023…0b13:92
renderPassport details

Inspect func

location

func(f v1.Finding) string

location is "file:line in Func".

Open
OID
07f023…0b13:93
location details

Inspect func

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.

Open
OID
07f023…0b13:94
renderFinding details

Inspect func

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.

Open
OID
07f023…0b13:95
renderVersions details

Inspect func

latestSuccessor

func(rec *v1.record) string

latestSuccessor returns the newest successor an author named.

Open
OID
07f023…0b13:96
latestSuccessor details

Inspect func

diffFindings

func(prev []v1.Finding, next []v1.Finding) string

diffFindings 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.

Open
OID
07f023…0b13:97
diffFindings details

Inspect func

reportURL

func(uri string) string

reportURL turns a stored report URI into a safe link target. IPFS URIs go through the IPFS gateway gnoweb itself uses, since links need https.

Open
OID
07f023…0b13:98
reportURL details

Inspect func

Request

type

Request is a scan request, as returned by reads.

Value

v1.Request

request

type

Value

v1.request

requestKey

func(id uint64) string
Open
OID
07f023…0b13:99
requestKey details

Inspect func

RequestScan

func(pkgpath string) uint64

RequestScan asks the scanner bot to scan pkgpath. Each address may have one open request at a time.

Open
OID
07f023…0b13:101
RequestScan details

Inspect func

CancelRequest

func()

CancelRequest withdraws the caller's open request.

Open
OID
07f023…0b13:102
CancelRequest details

Inspect func

CloseRequest

func(id uint64, note string)

CloseRequest lets an attester close a request it cannot serve, such as a package that does not exist.

Open
OID
07f023…0b13:103
CloseRequest details

Inspect func

finishRequest

func(id uint64, status string, note string)
Open
OID
07f023…0b13:104
finishRequest details

Inspect func

closeRequestsFor

func(pkgpath string)

closeRequestsFor marks every open request for pkgpath as attested.

Open
OID
07f023…0b13:105
closeRequestsFor details

Inspect func

GetRequest

func(id uint64) (v1.Request, bool)

GetRequest returns a copy of request id.

Open
OID
07f023…0b13:106
GetRequest details

Inspect func

OpenRequests

func(limit int) []v1.Request

OpenRequests returns up to limit open requests, oldest first, for the scanner bot.

Open
OID
07f023…0b13:107
OpenRequests details

Inspect func

OpenRequestsText

func(limit int) string

OpenRequestsText 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.

Open
OID
07f023…0b13:108
OpenRequestsText details

Inspect func

LatestHashes

func(pkgpath string) string

LatestHashes returns "\<source hash> \<rule-set hash>" of pkgpath's latest attestation, or "" if there is none, so the bot can skip unchanged code.

Open
OID
07f023…0b13:109
LatestHashes details

Inspect func

LabelProven

untyped string

Labels, exactly as the prover writes them.

Value

"PROVEN"

LabelNotReproduced

untyped string

Labels, exactly as the prover writes them.

Value

"NOT REPRODUCED"

LabelStaticWarning

untyped string

Labels, exactly as the prover writes them.

Value

"STATIC WARNING"

SeverityCritical

untyped string

Severities.

Value

"critical"

SeverityHigh

untyped string

Severities.

Value

"high"

SeverityMedium

untyped string

Severities.

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 string

Disclaimer 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

type

Deps counts dependency trust for an attestation.

Value

v1.Deps

computeScore

func(fs []v1.Finding, d v1.Deps) int

computeScore applies the formula: start at 100, deduct, floor at 0.

Open
OID
07f023…0b13:110
computeScore details

Inspect func

verdictOf

func(fs []v1.Finding) string
Open
OID
07f023…0b13:113
verdictOf details

Inspect func

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.

Open
OID
07f023…0b13:114
ScoreFor details

Inspect func

families

*v0.Tree

// base path -> \*avl.Tree (zero-padded N -> pkgpath)

Open
OID
07f023…0b13:116
families details

Inspect pointer

familyOf

func(pkgpath string) (base string, n int, ok bool)

familyOf splits ".../name/vN" into its base and N.

Open
OID
07f023…0b13:118
familyOf details

Inspect func

versionKey

func(n int) string
Open
OID
07f023…0b13:120
versionKey details

Inspect func

addToFamily

func(pkgpath string)
Open
OID
07f023…0b13:121
addToFamily details

Inspect func

Versions

func(pkgpath string) []string

Versions returns every attested version of pkgpath's package, oldest first. A path without a /vN suffix is its own only version.

Open
OID
07f023…0b13:122
Versions details

Inspect func
Finding : type =v1.Finding
Attestation : type =v1.Attestation
AuthorReply : type =v1.AuthorReply
record : type =v1.record
maxFindings : untyped bigint =(64 <untyped> bigint)
maxHistory : untyped bigint =(50 <untyped> bigint)
maxReplies : untyped bigint =(20 <untyped> bigint)
maxNoteLen : untyped bigint =(280 <untyped> bigint)
maxRecent : untyped bigint =(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) uint64 Inspect
getRecord : func(pkgpath string) *v1.record Inspect
addToAuthor : func(author .uverse.address, pkgpath string) Inspect
markRecent : func(pkgpath string) Inspect
countProven : func(fs []v1.Finding) int Inspect
parseFindings : func(s string) []v1.Finding Inspect
isIdent : func(s string) bool Inspect
isRuleID : func(s string) bool Inspect
isGnoFile : func(s string) bool Inspect
isHex64 : func(s string) bool Inspect
isToken : func(s string) bool Inspect
validReportURI : func(s string) bool Inspect
Badge : func(pkgpath string) string Inspect
verdictColor : func(v string) string Inspect
verdictWords : func(v string) string Inspect
admin : .uverse.address =<gnolang.StringValue>
attesters : *v0.Tree Inspect
selfPath : string ="gno.land/r/g19wmd95cwm3s0w0c5592tgu3zh4zgrtlggvugnj/bouncer/v1"
requests : *v0.Tree Inspect
openByRequester : *v0.Tree Inspect
openRequests : *v0.Tree Inspect
requestID : v0.ID =<zero>
records : *v0.Tree Inspect
byAuthor : *v0.Tree Inspect
attestationID : v0.ID =<zero>
recent : []string (len=2) Inspect
disputes : *v0.Tree Inspect
disputeID : v0.ID =<zero>
totalFindings : int =1
totalProven : int =1
init.39 : func() Inspect
assertAdmin : func() Inspect
assertAttester : func() .uverse.address Inspect
AddAttester : func(addr .uverse.address) Inspect
RemoveAttester : func(addr .uverse.address) Inspect
TransferAdmin : func(next .uverse.address) Inspect
Admin : func() .uverse.address Inspect
IsAttester : func(addr .uverse.address) bool Inspect
Attesters : func() [].uverse.address Inspect
maxPkgPathLen : untyped bigint =(200 <untyped> bigint)
validPkgPath : func(p string) bool Inspect
authorOf : func(pkgpath string) (.uverse.address, bool) Inspect
maxSnippetLen : untyped bigint =(1500 <untyped> bigint)
maxAttackLen : untyped bigint =(200 <untyped> bigint)
maxExploitLen : untyped bigint =(6000 <untyped> bigint)
maxEvidenceLen : untyped bigint =(1500 <untyped> bigint)
maxDetailBytes : untyped bigint =(32000 <untyped> bigint)
AddDetail : func(pkgpath string, id uint64, index int, snippet string, attack string, exploit string, before string, after string) Inspect
detailBytes : func(fs []v1.Finding) int Inspect
checkText : func(name string, s string, max int) Inspect
DisputeRecord : type =v1.DisputeRecord
dispute : type =v1.dispute
disputeKey : func(id uint64) string Inspect
Dispute : func(pkgpath string, reportHash string, note string) uint64 Inspect
ResolveDispute : func(id uint64, resolution string) Inspect
hasOpenDispute : func(pkgpath string, filer .uverse.address) bool Inspect
DisputesFor : func(pkgpath string) []v1.DisputeRecord Inspect
Reply : func(pkgpath string, note string, successor string) Inspect
Guidance : type =v1.Guidance
RuleGuidance : func(rule string) (v1.Guidance, bool) Inspect
copyAttestation : func(a v1.Attestation) v1.Attestation Inspect
Latest : func(pkgpath string) (v1.Attestation, bool) Inspect
History : func(pkgpath string) []v1.Attestation Inspect
Replies : func(pkgpath string) []v1.AuthorReply Inspect
Score : func(pkgpath string) (int, bool) Inspect
ByAuthor : func(addr .uverse.address) []string Inspect
Policy : type =v1.Policy
Strict : func() v1.Policy Inspect
Standard : func() v1.Policy Inspect
Custom : func(minScore int) v1.Policy Inspect
Check : func(pkgpath string, p v1.Policy) bool Inspect
Render : func(path string) string Inspect
webPath : func() string Inspect
verdictText : func(v string) string Inspect
date : func(unix int64) string Inspect
renderNoticeboard : func() string Inspect
renderPassport : func(pkgpath string) string Inspect
location : func(f v1.Finding) string Inspect
renderFinding : func(b *strings.Builder, n int, f v1.Finding) Inspect
renderVersions : func(b *strings.Builder, pkgpath string) Inspect
latestSuccessor : func(rec *v1.record) string Inspect
diffFindings : func(prev []v1.Finding, next []v1.Finding) string Inspect
reportURL : func(uri string) string Inspect
Request : type =v1.Request
request : type =v1.request
requestKey : func(id uint64) string Inspect
RequestScan : func(pkgpath string) uint64 Inspect
CancelRequest : func() Inspect
CloseRequest : func(id uint64, note string) Inspect
finishRequest : func(id uint64, status string, note string) Inspect
closeRequestsFor : func(pkgpath string) Inspect
GetRequest : func(id uint64) (v1.Request, bool) Inspect
OpenRequests : func(limit int) []v1.Request Inspect
OpenRequestsText : func(limit int) string Inspect
LatestHashes : func(pkgpath string) string Inspect
LabelProven : untyped string ="PROVEN"
LabelNotReproduced : untyped string ="NOT REPRODUCED"
LabelStaticWarning : untyped string ="STATIC WARNING"
SeverityCritical : untyped string ="critical"
SeverityHigh : untyped string ="high"
SeverityMedium : untyped string ="medium"
VerdictNotRecommended : untyped string ="not-recommended"
VerdictReview : untyped string ="review"
VerdictClear : untyped string ="clear"
Disclaimer : untyped string ="A high score means Bouncer found no issues with its current rules. It is not a guarantee of safety."
Deps : type =v1.Deps
computeScore : func(fs []v1.Finding, d v1.Deps) int Inspect
gradeOf : func(score int) string Inspect
verdictOf : func(fs []v1.Finding) string Inspect
ScoreFor : func(fs []v1.Finding, d v1.Deps) (score int, grade string, verdict string) Inspect
families : *v0.Tree Inspect
familyOf : func(pkgpath string) (base string, n int, ok bool) Inspect
versionKey : func(n int) string Inspect
addToFamily : func(pkgpath string) Inspect
Versions : func(pkgpath string) []string Inspect