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.

v0 state

Back to all declarations

Finding

type

Finding is one attested finding.

Value

v0.Finding

Attestation

type

Attestation is a scan result posted by an attester.

Value

v0.Attestation

AuthorReply

type

AuthorReply is an author's response to a Passport.

Value

v0.AuthorReply

record

type

record holds everything known about one package.

Value

v0.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" entries ("" for none). Score, grade and verdict are computed here from the findings and dependency counts.

Open
OID
04140f…4a02:3
Attest details

Inspect func

getRecord

func(pkgpath string) *v0.record
Open
OID
04140f…4a02:5
getRecord details

Inspect func

addToAuthor

func(author .uverse.address, pkgpath string)
Open
OID
04140f…4a02:6
addToAuthor details

Inspect func

markRecent

func(pkgpath string)
Open
OID
04140f…4a02:7
markRecent details

Inspect func

countProven

func(fs []v0.Finding) int
Open
OID
04140f…4a02:8
countProven details

Inspect func

parseFindings

func(s string) []v0.Finding

parseFindings validates and decodes the findings argument.

Open
OID
04140f…4a02:9
parseFindings details

Inspect func

isToken

func(s string) bool

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

Open
OID
04140f…4a02:13
isToken details

Inspect func

validReportURI

func(s string) bool
Open
OID
04140f…4a02:14
validReportURI details

Inspect func

admin

.uverse.address

Value

<gnolang.StringValue>

selfPath

string

Value

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

requests

*v0.Tree

// request id -> \*request

Open
OID
04140f…4a02:21
requests details

Inspect pointer

openByRequester

*v0.Tree

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

Open
OID
04140f…4a02:24
openByRequester details

Inspect pointer

openRequests

*v0.Tree

// request id -> true, open ones only

Open
OID
04140f…4a02:27
openRequests details

Inspect pointer

requestID

v0.ID

Value

<zero>

byAuthor

*v0.Tree

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

Open
OID
04140f…4a02:34
byAuthor details

Inspect pointer

attestationID

v0.ID

Value

<zero>

recent

[]string

// pkgpaths, most recently attested first

Value

<zero>

disputes

*v0.Tree

// dispute id -> \*dispute

Open
OID
04140f…4a02:39
disputes details

Inspect pointer

disputeID

v0.ID

Value

<zero>

totalFindings

int

Value

0

totalProven

int

Value

0

assertAttester

func() .uverse.address
Open
OID
04140f…4a02:47
assertAttester details

Inspect func

AddAttester

func(addr .uverse.address)

AddAttester allows addr to post attestations.

Open
OID
04140f…4a02:48
AddAttester details

Inspect func

RemoveAttester

func(addr .uverse.address)

RemoveAttester revokes addr. Its past attestations stay on record.

Open
OID
04140f…4a02:49
RemoveAttester details

Inspect func

TransferAdmin

func(next .uverse.address)

TransferAdmin hands the admin role to next.

Open
OID
04140f…4a02:50
TransferAdmin details

Inspect func

IsAttester

func(addr .uverse.address) bool

IsAttester reports whether addr may post attestations.

Open
OID
04140f…4a02:52
IsAttester details

Inspect func

Attesters

func() [].uverse.address
Open
OID
04140f…4a02:53
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
04140f…4a02:54
validPkgPath details

Inspect func

authorOf

func(pkgpath string) (.uverse.address, bool)
Open
OID
04140f…4a02:55
authorOf details

Inspect func

DisputeRecord

type

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

Value

v0.DisputeRecord

dispute

type

Value

v0.dispute

disputeKey

func(id uint64) string
Open
OID
04140f…4a02:56
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
04140f…4a02:58
Dispute details

Inspect func

ResolveDispute

func(id uint64, resolution string)

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

Open
OID
04140f…4a02:59
ResolveDispute details

Inspect func

hasOpenDispute

func(pkgpath string, filer .uverse.address) bool
Open
OID
04140f…4a02:60
hasOpenDispute details

Inspect func

DisputesFor

func(pkgpath string) []v0.DisputeRecord

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

Open
OID
04140f…4a02:61
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
04140f…4a02:62
Reply details

Inspect func

copyAttestation

func(a v0.Attestation) v0.Attestation

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

Open
OID
04140f…4a02:63
copyAttestation details

Inspect func

Latest

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

Latest returns the newest attestation for pkgpath.

Open
OID
04140f…4a02:65
Latest details

Inspect func

History

func(pkgpath string) []v0.Attestation

History returns every attestation for pkgpath, oldest first.

Open
OID
04140f…4a02:66
History details

Inspect func

Replies

func(pkgpath string) []v0.AuthorReply

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

Open
OID
04140f…4a02:67
Replies details

Inspect func

Score

func(pkgpath string) (int, bool)

Score returns the latest score for pkgpath.

Open
OID
04140f…4a02:68
Score details

Inspect func

ByAuthor

func(addr .uverse.address) []string

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

Open
OID
04140f…4a02:69
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

v0.Policy

Strict

func() v0.Policy

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

Open
OID
04140f…4a02:70
Strict details

Inspect func

Standard

func() v0.Policy

Standard: score 75 or more and no PROVEN Critical.

Open
OID
04140f…4a02:71
Standard details

Inspect func

Custom

func(minScore int) v0.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
04140f…4a02:72
Custom details

Inspect func

Check

func(pkgpath string, p v0.Policy) bool

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

Open
OID
04140f…4a02:73
Check details

Inspect func

Render

func(path string) string

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

Open
OID
04140f…4a02:74
Render details

Inspect func

webPath

func() string

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

Open
OID
04140f…4a02:76
webPath details

Inspect func

verdictText

func(v string) string
Open
OID
04140f…4a02:78
verdictText details

Inspect func

renderNoticeboard

func() string
Open
OID
04140f…4a02:80
renderNoticeboard details

Inspect func

renderPassport

func(pkgpath string) string
Open
OID
04140f…4a02:81
renderPassport details

Inspect func

latestSuccessor

func(rec *v0.record) string

latestSuccessor returns the newest successor an author named.

Open
OID
04140f…4a02:82
latestSuccessor details

Inspect func

diffRules

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

diffRules describes which rules appeared or were resolved between scans.

Open
OID
04140f…4a02:83
diffRules 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
04140f…4a02:84
reportURL details

Inspect func

ruleGuidance

func(rule string) (title string, guide string, fix string)

ruleGuidance is the fix guidance, written once per rule.

Open
OID
04140f…4a02:85
ruleGuidance details

Inspect func

Request

type

Request is a scan request, as returned by reads.

Value

v0.Request

request

type

Value

v0.request

requestKey

func(id uint64) string
Open
OID
04140f…4a02:86
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
04140f…4a02:88
RequestScan details

Inspect func

CancelRequest

func()

CancelRequest withdraws the caller's open request.

Open
OID
04140f…4a02:89
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
04140f…4a02:90
CloseRequest details

Inspect func

finishRequest

func(id uint64, status string, note string)
Open
OID
04140f…4a02:91
finishRequest details

Inspect func

closeRequestsFor

func(pkgpath string)

closeRequestsFor marks every open request for pkgpath as attested.

Open
OID
04140f…4a02:92
closeRequestsFor details

Inspect func

GetRequest

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

GetRequest returns a copy of request id.

Open
OID
04140f…4a02:93
GetRequest details

Inspect func

OpenRequests

func(limit int) []v0.Request

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

Open
OID
04140f…4a02:94
OpenRequests 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

v0.Deps

computeScore

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

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

Open
OID
04140f…4a02:95
computeScore details

Inspect func

verdictOf

func(fs []v0.Finding) string
Open
OID
04140f…4a02:98
verdictOf details

Inspect func

ScoreFor

func(fs []v0.Finding, d v0.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
04140f…4a02:99
ScoreFor details

Inspect func
Finding : type =v0.Finding
Attestation : type =v0.Attestation
AuthorReply : type =v0.AuthorReply
record : type =v0.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) *v0.record Inspect
addToAuthor : func(author .uverse.address, pkgpath string) Inspect
markRecent : func(pkgpath string) Inspect
countProven : func(fs []v0.Finding) int Inspect
parseFindings : func(s string) []v0.Finding 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
admin : .uverse.address =<gnolang.StringValue>
attesters : *v0.Tree Inspect
selfPath : string ="gno.land/r/g19wmd95cwm3s0w0c5592tgu3zh4zgrtlggvugnj/bouncer/v0"
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 =<zero>
disputes : *v0.Tree Inspect
disputeID : v0.ID =<zero>
totalFindings : int =0
totalProven : int =0
init.35 : 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
DisputeRecord : type =v0.DisputeRecord
dispute : type =v0.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) []v0.DisputeRecord Inspect
Reply : func(pkgpath string, note string, successor string) Inspect
copyAttestation : func(a v0.Attestation) v0.Attestation Inspect
Latest : func(pkgpath string) (v0.Attestation, bool) Inspect
History : func(pkgpath string) []v0.Attestation Inspect
Replies : func(pkgpath string) []v0.AuthorReply Inspect
Score : func(pkgpath string) (int, bool) Inspect
ByAuthor : func(addr .uverse.address) []string Inspect
Policy : type =v0.Policy
Strict : func() v0.Policy Inspect
Standard : func() v0.Policy Inspect
Custom : func(minScore int) v0.Policy Inspect
Check : func(pkgpath string, p v0.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
latestSuccessor : func(rec *v0.record) string Inspect
diffRules : func(prev []v0.Finding, next []v0.Finding) string Inspect
reportURL : func(uri string) string Inspect
ruleGuidance : func(rule string) (title string, guide string, fix string) Inspect
Request : type =v0.Request
request : type =v0.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) (v0.Request, bool) Inspect
OpenRequests : func(limit int) []v0.Request 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 =v0.Deps
computeScore : func(fs []v0.Finding, d v0.Deps) int Inspect
gradeOf : func(score int) string Inspect
verdictOf : func(fs []v0.Finding) string Inspect
ScoreFor : func(fs []v0.Finding, d v0.Deps) (score int, grade string, verdict string) Inspect