Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

OpenSSF Scorecard - Security health metrics for Open Source

License

NotificationsYou must be signed in to change notification settings

nokia/scorecard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenSSF ScorecardOpenSSF Best PracticesbuildCodeQLGo ReferenceGo Report CardcodecovSLSA 3Slack

Overview

Using Scorecard

Checks

Other Important Recommendations

Scoring

Contribute

FAQ

Overview

What is Scorecard?

We created Scorecard to help open source maintainers improve their securitybest practices and to help open source consumers judge whether their dependenciesare safe.

Scorecard is an automated tool that assesses a number of important heuristics("checks") associated with software security and assignseach check a score of 0-10. You can use these scores to understand specificareas to improve in order to strengthen the security posture of your project.You can also assess the risks that dependencies introduce, and make informeddecisions about accepting these risks, evaluating alternative solutions, orworking with the maintainers to make improvements.

The inspiration for Scorecard’s logo:"You passed! All D's ... and an A!"

Project Goals

  1. Automate analysis and trust decisions on the security posture of open sourceprojects.

  2. Use this data to proactively improve the security posture of the criticalprojects the world depends on.

Prominent Scorecard Users

Scorecard has been run on thousands of projects to monitor and track securitymetrics. Prominent projects that use Scorecard include:

Public Data

We run a weekly Scorecard scan of the 1 million most critical open sourceprojects judged by their direct dependencies and publish the results in aBigQuery public dataset.

This data is available in the public BigQuery datasetopenssf:scorecardcron.scorecard-v2. The latest results are available in theBigQuery viewopenssf:scorecardcron.scorecard-v2_latest.

You can query the data usingBigQuery Explorer by navigating to Add Data > Star a project by name > 'openssf'.For example, you may be interested in how a project's score has changed over time:

SELECTdate, scoreFROM`openssf.scorecardcron.scorecard-v2`WHERErepo.name="github.com/ossf/scorecard"ORDER BYdateASC

You can extract the latest results to Google Cloud storage in JSON format usingthebq tool:

# Get the latest PARTITION_IDbq query --nouse_legacy_sql 'SELECT partition_id FROMopenssf.scorecardcron.INFORMATION_SCHEMA.PARTITIONS WHERE table_name="scorecard-v2"AND partition_id!="__NULL__" ORDER BY partition_id DESCLIMIT 1'# Extract to GCSbq extract --destination_format=NEWLINE_DELIMITED_JSON'openssf:scorecardcron.scorecard-v2$<partition_id>' gs://bucket-name/filename-*.json

The list of projects that are checked is available in thecron/internal/data/projects.csvfile in this repository. If you would like us to track more, please feel free tosend a Pull Request with others. Currently, this list is derived fromprojectshosted on GitHub ONLY. We do plan to expand them in near future to account forprojects hosted on other source control systems.

Using Scorecard

Scorecard GitHub Action

The easiest way to use Scorecard on GitHub projects you own is with theScorecard GitHub Action. The Actionruns on any repository change and issues alerts that maintainers can view in therepository’s Security tab. For more information, see the Scorecard GitHubActioninstallation instructions.

Scorecard REST API

To query pre-calculated scores of OSS projects, use theREST API.

To enable your project to be available on the REST API, setpublish_results: truein the Scorecard GitHub Action setting.

Scorecard Badges

Enablingpublish_results: truein Scorecard GitHub Actions also allows maintainers to display a Scorecard badge on their repository to show off theirhard work. This badge also auto-updates for every change made to the repository. See more details onthis OSSF blogpost.

To include a badge on your project's repository, simply add the following markdown to your README:

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/{owner}/{repo}/badge)](https://securityscorecards.dev/viewer/?uri=github.com/{owner}/{repo})

Scorecard Command Line Interface

To run a Scorecard scan on projects you do not own, use the command lineinterface installation option.

Prerequisites

Platforms: Currently, Scorecard supports OSX and Linux platforms. If you areusing a Windows OS you may experience issues. Contributions towards supportingWindows are welcome.

Language: You must have GoLang installed to run Scorecard(https://golang.org/doc/install)

Installation

Docker

scorecard is available as a Docker container:

docker pull gcr.io/openssf/scorecard:stable

To use a specific scorecard version (e.g., v3.2.1), run:

docker pull gcr.io/openssf/scorecard:v3.2.1
Standalone

To install Scorecard as a standalone:

Visit our latestrelease page anddownload the correct zip file for your operating system.

Add the binary to yourGOPATH/bin directory (usego env GOPATH to identify your directory if necessary).

Verifying SLSA provenance for downloaded releases

We generateSLSA3 signatures using the OpenSSF'sslsa-framework/slsa-github-generator during the release process. To verify a release binary:

  1. Install the verification tool fromslsa-framework/slsa-verifier#installation.
  2. Download the signature fileattestation.intoto.jsonl from theGitHub releases page.
  3. Run the verifier:
slsa-verifier -artifact-path<the-zip> -provenance attestation.intoto.jsonl -source github.com/ossf/scorecard -tag<the-tag>
Using package managers
Package ManagerSupported DistributionCommand
NixNixOSnix-shell -p nixpkgs.scorecard
AUR helperArch LinuxUse your AUR helper to installscorecard
HomebrewmacOS or Linuxbrew install scorecard

Authentication

GitHub imposesapi rate limitson unauthenticated requests. To avoid these limits, you must authenticate yourrequests before running Scorecard. There are two ways to authenticate yourrequests: either create a GitHub personal access token, or create a GitHub AppInstallation.

  • Create a classic GitHub personal access token.When creating the personal access token, we suggest you choose thepublic_repo scope. Set the token in an environment variable calledGITHUB_AUTH_TOKEN,GITHUB_TOKEN,GH_AUTH_TOKEN orGH_TOKEN using thecommands below according to your platform.
# For posix platforms, e.g. linux, mac:export GITHUB_AUTH_TOKEN=<your access token># Multiple tokens can be provided separated by comma to be utilized# in a round robin fashion.export GITHUB_AUTH_TOKEN=<your access token1>,<your access token2># For windows:set GITHUB_AUTH_TOKEN=<your access token>set GITHUB_AUTH_TOKEN=<your access token1>,<your access token2>

OR

  • Create a GitHub App Installationfor higher rate-limit quotas. If you have an installed GitHub App and keyfile, you can use the three environment variables below, following thecommands (set orexport) shown above for your platform.
GITHUB_APP_KEY_PATH=<path to the key file on disk>GITHUB_APP_INSTALLATION_ID=<installation id>GITHUB_APP_ID=<app id>

These variables can be obtained from the GitHubdeveloper settings page.

Basic Usage

Using repository URL

Scorecard can run using just one argument, the URL of the target repo:

$ scorecard --repo=github.com/ossf-tests/scorecard-check-branch-protection-e2eStarting [CII-Best-Practices]Starting [Fuzzing]Starting [Pinned-Dependencies]Starting [CI-Tests]Starting [Maintained]Starting [Packaging]Starting [SAST]Starting [Dependency-Update-Tool]Starting [Token-Permissions]Starting [Security-Policy]Starting [Signed-Releases]Starting [Binary-Artifacts]Starting [Branch-Protection]Starting [Code-Review]Starting [Contributors]Starting [Vulnerabilities]Finished [CI-Tests]Finished [Maintained]Finished [Packaging]Finished [SAST]Finished [Signed-Releases]Finished [Binary-Artifacts]Finished [Branch-Protection]Finished [Code-Review]Finished [Contributors]Finished [Dependency-Update-Tool]Finished [Token-Permissions]Finished [Security-Policy]Finished [Vulnerabilities]Finished [CII-Best-Practices]Finished [Fuzzing]Finished [Pinned-Dependencies]RESULTS-------Aggregate score: 7.9 / 10Check scores:|---------|------------------------|--------------------------------|---------------------------------------------------------------------------||  SCORE|          NAME|             REASON|                         DOCUMENTATION/REMEDIATION||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 10 / 10| Binary-Artifacts| no binaries foundin the repo| github.com/ossf/scorecard/blob/main/docs/checks.md#binary-artifacts||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 9 / 10| Branch-Protection| branch protection is not| github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection|||| maximal on development and all||||| release branches|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------||?| CI-Tests| no pull request found| github.com/ossf/scorecard/blob/main/docs/checks.md#ci-tests||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 0 / 10| CII-Best-Practices| no badge found| github.com/ossf/scorecard/blob/main/docs/checks.md#cii-best-practices||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 10 / 10| Code-Review| branch protectionfor default| github.com/ossf/scorecard/blob/main/docs/checks.md#code-review|||| branch is enabled|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 0 / 10| Contributors| 0 different companies found --| github.com/ossf/scorecard/blob/main/docs/checks.md#contributors|||| score normalized to 0|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 0 / 10| Dependency-Update-Tool| no update tool detected| github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 0 / 10| Fuzzing| project is not fuzzedin| github.com/ossf/scorecard/blob/main/docs/checks.md#fuzzing|||| OSS-Fuzz|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 1 / 10| Maintained| 2 commit(s) foundin the last| github.com/ossf/scorecard/blob/main/docs/checks.md#maintained|||| 90 days -- score normalized to||||| 1|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------||?| Packaging| no published package detected| github.com/ossf/scorecard/blob/main/docs/checks.md#packaging||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 8 / 10| Pinned-Dependencies| unpinned dependencies detected| github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies|||| -- score normalized to 8|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 0 / 10| SAST| no SAST tool detected| github.com/ossf/scorecard/blob/main/docs/checks.md#sast||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 0 / 10| Security-Policy| security policy file not| github.com/ossf/scorecard/blob/main/docs/checks.md#security-policy|||| detected|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------||?| Signed-Releases| no releases found| github.com/ossf/scorecard/blob/main/docs/checks.md#signed-releases||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 10 / 10| Token-Permissions| tokens are read-onlyin GitHub| github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions|||| workflows|||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|| 10 / 10| Vulnerabilities| no vulnerabilities detected| github.com/ossf/scorecard/blob/main/docs/checks.md#vulnerabilities||---------|------------------------|--------------------------------|---------------------------------------------------------------------------|
Docker

TheGITHUB_AUTH_TOKEN has to be set to a validtoken

docker run -e GITHUB_AUTH_TOKEN=token gcr.io/openssf/scorecard:stable --show-details --repo=https://github.com/ossf/scorecard

To use a specific scorecard version (e.g., v3.2.1), run:

docker run -e GITHUB_AUTH_TOKEN=token gcr.io/openssf/scorecard:v3.2.1 --show-details --repo=https://github.com/ossf/scorecard
Showing Detailed Results

For more details about why a check fails, use the--show-details option:

./scorecard --repo=github.com/ossf-tests/scorecard-check-branch-protection-e2e --checks Branch-Protection --show-detailsStarting [Pinned-Dependencies]Finished [Pinned-Dependencies]RESULTS-------|---------|------------------------|--------------------------------|--------------------------------|---------------------------------------------------------------------------||  SCORE  |          NAME          |             REASON             |            DETAILS             |                         DOCUMENTATION/REMEDIATION                         ||---------|------------------------|--------------------------------|--------------------------------|---------------------------------------------------------------------------|| 9 / 10  | Branch-Protection      | branch protection is not       | Info: 'force pushes' disabled  | github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection      ||         |                        | maximal on development and all | on branch 'main' Info: 'allow  |                                                                           ||         |                        | release branches               | deletion' disabled on branch   |                                                                           ||         |                        |                                | 'main' Info: linear history    |                                                                           ||         |                        |                                | enabled on branch 'main' Info: |                                                                           ||         |                        |                                | strict status check enabled    |                                                                           ||         |                        |                                | on branch 'main' Warn: status  |                                                                           ||         |                        |                                | checks for merging have no     |                                                                           ||         |                        |                                | specific status to check on    |                                                                           ||         |                        |                                | branch 'main' Info: number     |                                                                           ||         |                        |                                | of required reviewers is 2     |                                                                           ||         |                        |                                | on branch 'main' Info: Stale   |                                                                           ||         |                        |                                | review dismissal enabled on    |                                                                           ||         |                        |                                | branch 'main' Info: Owner      |                                                                           ||         |                        |                                | review required on branch      |                                                                           ||         |                        |                                | 'main' Info: 'admininistrator' |                                                                           ||         |                        |                                | PRs need reviews before being  |                                                                           ||         |                        |                                | merged on branch 'main'        |                                                                           ||---------|------------------------|--------------------------------|--------------------------------|---------------------------------------------------------------------------|
Using GitHub Enterprise Server (GHES) based Repository

To use a GitHub Enterprise hostgithub.corp.com, use theGH_HOST environment variable.

# Set the GitHub Enterprise host without https prefix or slash with relevant authentication tokenexport GH_HOST=github.corp.comexport GITHUB_AUTH_TOKEN=tokenscorecard --repo=github.corp.com/org/repo# OR without github host urlscorecard --repo=org/repo
Using a Package manager

For projects in the--npm,--pypi,--rubygems, or--nuget ecosystems, you have theoption to run Scorecard using a package manager. Provide the package name torun the checks on the corresponding GitHub source code.

For example,--npm=angular.

Running specific checks

To run only specific check(s), add the--checks argument with a list of checknames.

For example,--checks=CI-Tests,Code-Review.

Formatting Results

The currently supported formats aredefault (text) andjson.

These may be specified with the--format flag. For example,--format=json.

Checks

Scorecard Checks

The following checks are all run against the target project by default:

NameDescriptionRisk LevelToken RequiredGitLab SupportNote
Binary-ArtifactsIs the project free of checked-in binaries?HighPAT, GITHUB_TOKENSupported
Branch-ProtectionDoes the project useBranch Protection ?HighPAT (repo orrepo> public_repo), GITHUB_TOKENSupported (see notes)certain settings are only supported with a maintainer PAT
CI-TestsDoes the project run tests in CI, e.g.GitHub Actions,Prow?LowPAT, GITHUB_TOKENSupported
CII-Best-PracticesHas the project earned anOpenSSF (formerly CII) Best Practices Badge at the passing, silver, or gold level?LowPAT, GITHUB_TOKENValidating
Code-ReviewDoes the project practice code review before code is merged?HighPAT, GITHUB_TOKENValidating
ContributorsDoes the project have contributors from at least two different organizations?LowPAT, GITHUB_TOKENValidating
Dangerous-WorkflowDoes the project avoid dangerous coding patterns in GitHub Action workflows?CriticalPAT, GITHUB_TOKENUnsupported
Dependency-Update-ToolDoes the project use tools to help update its dependencies?HighPAT, GITHUB_TOKENUnsupported
FuzzingDoes the project use fuzzing tools, e.g.OSS-Fuzz,QuickCheck orfast-check?MediumPAT, GITHUB_TOKENValidating
LicenseDoes the project declare a license?LowPAT, GITHUB_TOKENValidating
MaintainedIs the project at least 90 days old, and maintained?HighPAT, GITHUB_TOKENValidating
Pinned-DependenciesDoes the project declare and pindependencies?MediumPAT, GITHUB_TOKENValidating
PackagingDoes the project build and publish official packages from CI/CD, e.g.GitHub Publishing ?MediumPAT, GITHUB_TOKENValidating
SASTDoes the project use static code analysis tools, e.g.CodeQL,LGTM (deprecated),SonarCloud?MediumPAT, GITHUB_TOKENUnsupported
Security-PolicyDoes the project contain asecurity policy?MediumPAT, GITHUB_TOKENValidating
Signed-ReleasesDoes the project cryptographicallysign releases?HighPAT, GITHUB_TOKENValidating
Token-PermissionsDoes the project declare GitHub workflow tokens asread only?HighPAT, GITHUB_TOKENUnsupported
VulnerabilitiesDoes the project have unfixed vulnerabilities? Uses theOSV service.HighPAT, GITHUB_TOKENValidating
WebhooksDoes the webhook defined in the repository have a token configured to authenticate the origins of requests?Criticalmaintainer PAT (admin: repo_hook oradmin> read:repo_hookdocEXPERIMENTAL

Detailed Checks Documentation

To see detailed information about each check, its scoring criteria, andremediation steps, check out thechecks documentation page.

Other Important Recommendations

Two-factor Authentication (2FA)

Two-factor Authentication (2FA) adds an extra layer of security when logging into websites or apps. 2FA protects your account if your password is compromised by requiring a second form of authentication, such as codes sent via SMS or authentication app, or touching a physical security key.

We strongly recommend that you enable 2FA on GitHub and any important account where it is available. 2FA is not a Scorecard check because GitHub does not make that data about user accounts public. Arguably, this data should always remain private, since accounts without 2FA are so vulnerable to attack.

Though it is not an official check, we urge all project maintainers to enable 2FA to protect their projects from compromise.

Enabling 2FA

For users

Follow the steps described atConfiguring two-factor authentication

If possible, use either:

  • physical security key (preferred), such as Titan or Yubikey
  • recovery codes, stored in an access protected and encrypted vault

As a last option, use SMS. Beware: 2FA using SMS is vulnerable toSIM swap attack.

For an organization
  1. Prepare to require 2FA in your organization
  2. Require 2FA in your organization

Scoring

Aggregate Score

Each individual check returns a score of 0 to 10, with 10 representing the bestpossible score. Scorecard also produces an aggregate score, which is aweight-based average of the individual checks weighted by risk.

  • “Critical” risk checks are weighted at 10
  • “High” risk checks are weighted at 7.5
  • “Medium” risk checks are weighted at 5
  • “Low” risk checks are weighted at 2.5

See thelist of current Scorecard checks for each check'srisk level.

Contribute

Report Problems

If you have what looks like a bug, please use theGithub issue tracking system. Beforeyou file an issue, please search existing issues to see if your issue is alreadycovered.

Contribute to Scorecard

Before contributing, please follow ourCode of Conduct.

See theContributing documentation for guidance on how tocontribute to the project.

Adding a Scorecard Check

If you'd like to add a check, please see guidancehere.

Connect with the Scorecard Community

If you want to get involved in the Scorecard community or have ideas you'd liketo chat about, we discuss this project in theOSSF Best Practices Working Groupmeetings.

ArtifactLink
Scorecard Dev Forumossf-scorecard-dev@
Scorecard Announcements Forumossf-scorecard-announce@
Community Meeting VCLink to z o o m meeting
Community Meeting CalendarBiweekly Thursdays, 1:00pm-2:00pm PST
Calendar
Meeting NotesNotes
Slack Channel#security_scorecards

Maintainers are listed in theCODEOWNERS file.

Report a Security Issue

To report a security issue, please follow instructionshere.

Join the Scorecards Project Meeting

Zoom

We meet every other Thursday - 4p ET on thiszoom link.

Agenda

You can see theagenda and meeting notes here.

Stargazers over time

Stargazers over time

FAQ

FAQ

See theFAQ for answers to Frequently Asked Questions about Scorecard.

About

OpenSSF Scorecard - Security health metrics for Open Source

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go98.2%
  • Makefile1.2%
  • Other0.6%

[8]ページ先頭

©2009-2025 Movatter.jp