Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from ossf:main #104

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
eb99bd4
.github: Add initial CODEOWNERS
justaugustus Jul 1, 2024
c3b98e3
Bump github.com/hashicorp/go-retryablehttp in the go_modules group
dependabot[bot] Jun 24, 2024
4c1aa07
Bump github.com/bradleyfalzon/ghinstallation/v2 from 2.10.0 to 2.11.0
dependabot[bot] May 31, 2024
a23f50d
Bump ko-build/setup-ko from 0.6 to 0.7
dependabot[bot] Jun 18, 2024
398db45
Bump golangci/golangci-lint-action from 4 to 6
dependabot[bot] Jul 2, 2024
8172222
Bump ossf/scorecard-action from 2.1.3 to 2.3.3
dependabot[bot] May 10, 2024
ae7f629
Bump sigstore/cosign-installer from 3.4.0 to 3.5.0
dependabot[bot] May 3, 2024
7939932
Bump github.com/rs/zerolog from 1.32.0 to 1.33.0
dependabot[bot] May 23, 2024
9adcbec
Bump github.com/rhysd/actionlint from 1.6.27 to 1.7.1
dependabot[bot] Jul 2, 2024
a10a639
[StepSecurity] ci: Harden GitHub Actions
step-security-bot Jul 2, 2024
8751603
Bump actions/setup-go from 4.0.1 to 5.0.1
dependabot[bot] Jul 2, 2024
dd0a6d4
Bump actions/checkout from 4.1.1 to 4.1.7
dependabot[bot] Jul 2, 2024
5d71b29
go.mod: Update Scorecard to v5.0.0-rc2
justaugustus Jul 2, 2024
c66f943
.github: Create codeql.yml
justaugustus Jul 2, 2024
9bcc5c7
CodeQL: Dedupe post-merge configs, pin SHAs, strip add'l permissions
justaugustus Jul 2, 2024
e329fdf
docs: Correct instances of "Security Scorecards" to "OpenSSF Scorecard"
justaugustus Jul 2, 2024
3ff8fdf
README: Correct Scorecard API URL
justaugustus Jul 2, 2024
c6ddfbd
Bump actions/upload-artifact from 4.3.3 to 4.3.4
dependabot[bot] Jul 8, 2024
dfc5f57
Bump actions/setup-go from 5.0.1 to 5.0.2
dependabot[bot] Jul 11, 2024
a70d55b
Bump github/codeql-action from 3.25.11 to 3.25.12
dependabot[bot] Jul 12, 2024
3b9c886
Bump actions/dependency-review-action from 4.3.3 to 4.3.4
dependabot[bot] Jul 12, 2024
a89f5bc
Bump github/codeql-action from 3.25.12 to 3.25.13
dependabot[bot] Jul 22, 2024
e63e249
Bump github.com/ossf/scorecard/v5 from 5.0.0-rc2 to 5.0.0
dependabot[bot] Jul 22, 2024
38d990d
go.mod: Update `go` directive to go1.12.12
justaugustus Jul 22, 2024
e1316aa
Bump github/codeql-action from 3.25.13 to 3.25.14
dependabot[bot] Jul 25, 2024
434ff60
Bump gocloud.dev from 0.37.0 to 0.38.0
dependabot[bot] Jul 26, 2024
5d4062e
Bump github/codeql-action from 3.25.14 to 3.25.15
dependabot[bot] Jul 28, 2024
07cd81d
Bump ossf/scorecard-action from 2.3.3 to 2.4.0
dependabot[bot] Jul 28, 2024
df60525
Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0
dependabot[bot] Jul 30, 2024
5e6dd6d
Bump actions/upload-artifact from 4.3.4 to 4.3.5
dependabot[bot] Aug 5, 2024
5c9ebc9
Bump golang.org/x/sync from 0.7.0 to 0.8.0
dependabot[bot] Aug 5, 2024
8c554f6
Bump sigstore/cosign-installer from 3.5.0 to 3.6.0
dependabot[bot] Aug 8, 2024
2a29177
Bump actions/upload-artifact from 4.3.5 to 4.3.6
dependabot[bot] Aug 7, 2024
904b98b
Bump github/codeql-action from 3.25.15 to 3.26.0
dependabot[bot] Aug 7, 2024
2876086
Bump gocloud.dev from 0.38.0 to 0.39.0
dependabot[bot] Aug 15, 2024
7a8bc67
Bump github.com/Masterminds/semver/v3 from 3.2.1 to 3.3.0
dependabot[bot] Aug 28, 2024
95b6e08
Bump actions/upload-artifact from 4.3.6 to 4.4.0
dependabot[bot] Sep 2, 2024
826fb08
Bump github/codeql-action from 3.26.0 to 3.26.7
dependabot[bot] Sep 16, 2024
05123ba
Bump github/codeql-action from 3.26.7 to 3.26.8
dependabot[bot] Sep 19, 2024
2ee59a2
Bump github.com/rhysd/actionlint from 1.7.1 to 1.7.2
dependabot[bot] Sep 24, 2024
4b1d421
Support globs for optOut/optInRepos
coheigea Sep 24, 2024
4599160
Bump github/codeql-action from 3.26.8 to 3.26.9
dependabot[bot] Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CODEOWNERS reference: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# the following users/teams will be requested for
# review when someone opens a pull request.
* @ossf/allstar-maintainers
75 changes: 75 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '18 13 * * 6'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

strategy:
fail-fast: false
matrix:
include:
- language: go
build-mode: autobuild
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
category: "/language:${{matrix.language}}"
17 changes: 4 additions & 13 deletions .github/workflows/postmerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,19 @@ permissions:
contents: read
security-events: write
jobs:
codeql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: go
- uses: github/codeql-action/autobuild@v3
- uses: github/codeql-action/analyze@v3
scorecard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ossf/scorecard-action@v2.1.3
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
- uses: github/codeql-action/upload-sarif@v3
- uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
sarif_file: results.sarif
18 changes: 9 additions & 9 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.21'
check-latest: true
- uses: golangci/golangci-lint-action@v4
- uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
args: --timeout 3m --verbose
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.21'
check-latest: true
- run: go build -v ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.21'
check-latest: true
Expand All @@ -36,5 +36,5 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: '1.21'
check-latest: true

- uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
- uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0

- uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6
- uses: ko-build/setup-ko@3aebd0597dc1e9d1a26bcfdb7cbeb19c131d3037 # v0.7

- run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.workflow }} --password-stdin

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ossf/allstar/badge)](https://api.securityscorecards.dev/projects/github.com/ossf/allstar)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/ossf/allstar/badge)](https://api.scorecard.dev/projects/github.com/ossf/allstar)

<img align="right" src="artwork/openssf_allstar_alt.png" width="300" height="400">

Expand Down Expand Up @@ -321,8 +321,8 @@ here](https://pkg.go.dev/github.com/ossf/allstar/pkg/policies/workflow#OrgConfig

This policy checks the GitHub Actions workflow configuration files
(`.github/workflows`), for any patterns that match known dangerous
behavior. See the [Security Scorecards
Documentation](https://github.com/ossf/scorecard/blob/main/docs/checks.md#dangerous-workflow)
behavior. See the [OpenSSF Scorecard
documentation](https://github.com/ossf/scorecard/blob/main/docs/checks.md#dangerous-workflow)
for more information on this check.

### Generic Scorecard Check
Expand All @@ -333,8 +333,8 @@ here](https://pkg.go.dev/github.com/ossf/allstar/pkg/policies/scorecard#OrgConfi

This policy runs any scorecard check listed in the `checks` configuration. All
checks run must have a score equal or above the `threshold` setting. Please see
the [Security Scorecards
Documentation](https://github.com/ossf/scorecard/blob/main/docs/checks.md)
the [OpenSSF Scorecard
documentation](https://github.com/ossf/scorecard/blob/main/docs/checks.md)
for more information on each check.

### GitHub Actions
Expand Down
Loading
Loading