Versions in this module Expand all Collapse all v5 v5.0.0 Jul 19, 2024 Changes in this version + const HeadSHA + var ErrUnsupportedFeature = errors.New("unsupported feature") + type BadgeLevel uint + const Gold + const InProgress + const NotFound + const Passing + const Silver + const Unknown + func (badge BadgeLevel) String() string + type BadgeResponse struct + BadgeLevel string + func ParseBadgeResponseFromJSON(data []byte) ([]BadgeResponse, error) + func (resp BadgeResponse) AsJSON() ([]byte, error) + type BranchProtectionRule struct + AllowDeletions *bool + AllowForcePushes *bool + CheckRules StatusChecksRule + EnforceAdmins *bool + PullRequestRule PullRequestRule + RequireLastPushApproval *bool + RequireLinearHistory *bool + type BranchRef struct + BranchProtectionRule BranchProtectionRule + Name *string + Protected *bool + type CIIBestPracticesClient interface + GetBadgeLevel func(ctx context.Context, uri string) (BadgeLevel, error) + func BlobCIIBestPracticesClient(bucketURL string) CIIBestPracticesClient + func DefaultCIIBestPracticesClient() CIIBestPracticesClient + type CheckRun struct + App CheckRunApp + Conclusion string + Status string + URL string + type CheckRunApp struct + Slug string + type Commit struct + AssociatedMergeRequest PullRequest + CommittedDate time.Time + Committer User + Message string + SHA string + type Issue struct + Author *User + AuthorAssociation *RepoAssociation + Comments []IssueComment + CreatedAt *time.Time + URI *string + type IssueComment struct + Author *User + AuthorAssociation *RepoAssociation + CreatedAt *time.Time + type Label struct + Name string + type Language struct + Name LanguageName + NumLines int + type LanguageName string + const All + const C + const CMake + const CSharp + const Cpp + const Dockerfile + const Go + const Haskell + const Java + const JavaScript + const Kotlin + const ObjectiveC + const Other + const PHP + const Python + const Ruby + const Rust + const Scala + const StarLark + const Swift + const TypeScript + type License struct + Key string + Name string + Path string + SPDXId string + Size int + Type string + type PullRequest struct + Author User + HeadSHA string + Labels []Label + MergedAt time.Time + MergedBy User + Number int + Reviews []Review + type PullRequestRule struct + DismissStaleReviews *bool + RequireCodeOwnerReviews *bool + Required *bool + RequiredApprovingReviewCount *int32 + type Release struct + Assets []ReleaseAsset + TagName string + TargetCommitish string + URL string + type ReleaseAsset struct + Name string + URL string + type Repo interface + AppendMetadata func(metadata ...string) + Host func() string + IsValid func() error + Metadata func() []string + Path func() string + String func() string + URI func() string + type RepoAssociation uint32 + const RepoAssociationCollaborator + const RepoAssociationContributor + const RepoAssociationFirstTimeContributor + const RepoAssociationFirstTimer + const RepoAssociationMaintainer + const RepoAssociationMannequin + const RepoAssociationMember + const RepoAssociationNone + const RepoAssociationOwner + func (r RepoAssociation) Gte(val RepoAssociation) bool + func (r RepoAssociation) String() string + type RepoClient interface + Close func() error + GetBranch func(branch string) (*BranchRef, error) + GetCreatedAt func() (time.Time, error) + GetDefaultBranch func() (*BranchRef, error) + GetDefaultBranchName func() (string, error) + GetFileReader func(filename string) (io.ReadCloser, error) + GetOrgRepoClient func(context.Context) (RepoClient, error) + InitRepo func(repo Repo, commitSHA string, commitDepth int) error + IsArchived func() (bool, error) + ListCheckRunsForRef func(ref string) ([]CheckRun, error) + ListCommits func() ([]Commit, error) + ListContributors func() ([]User, error) + ListFiles func(predicate func(string) (bool, error)) ([]string, error) + ListIssues func() ([]Issue, error) + ListLicenses func() ([]License, error) + ListProgrammingLanguages func() ([]Language, error) + ListReleases func() ([]Release, error) + ListStatuses func(ref string) ([]Status, error) + ListSuccessfulWorkflowRuns func(filename string) ([]WorkflowRun, error) + ListWebhooks func() ([]Webhook, error) + LocalPath func() (string, error) + Search func(request SearchRequest) (SearchResponse, error) + SearchCommits func(request SearchCommitsOptions) ([]Commit, error) + URI func() string + type Review struct + Author *User + State string + type SearchCommitsOptions struct + Author string + type SearchRequest struct + Filename string + Path string + Query string + type SearchResponse struct + Hits int + Results []SearchResult + type SearchResult struct + Path string + type Status struct + Context string + State string + TargetURL string + URL string + type StatusChecksRule struct + Contexts []string + RequiresStatusChecks *bool + UpToDateBeforeMerge *bool + type User struct + Companies []string + ID int64 + IsBot bool + Login string + NumContributions int + Organizations []User + type VulnerabilitiesClient interface + ListUnfixedVulnerabilities func(context context.Context, commit string, localDir string) (VulnerabilitiesResponse, error) + func DefaultVulnerabilitiesClient() VulnerabilitiesClient + func ExperimentalLocalOSVClient() VulnerabilitiesClient + type VulnerabilitiesResponse struct + Vulnerabilities []Vulnerability + type Vulnerability struct + Aliases []string + ID string + type Webhook struct + ID int64 + Path string + UsesAuthSecret bool + type WorkflowRun struct + HeadSHA *string + URL string v5.0.0-rc2 May 7, 2024 v5.0.0-rc1 Apr 12, 2024 Other modules containing this package github.com/ossf/scorecard/v2 github.com/ossf/scorecard/v3 github.com/ossf/scorecard/v4