Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ossf/scorecard-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.1
Choose a base ref
...
head repository: ossf/scorecard-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.2
Choose a head ref
  • 19 commits
  • 26 files changed
  • 5 contributors

Commits on Jun 1, 2022

  1. Copy the full SHA
    8e9099b View commit details

Commits on Jun 8, 2022

  1. 🌱 Update Scorecard API usage (#336)

    * Update Scorecard API usage
    * Add documentation for e2e tests
    
    Co-authored-by: Azeem Shaikh <azeems@google.com>
    azeemshaikh38 and azeemsgoogle authored Jun 8, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    Zuoqiu-Yingyi Yingyi / 颖逸
    Copy the full SHA
    dcb9126 View commit details
  2. Update e2e repo info (#399)

    Co-authored-by: Azeem Shaikh <azeems@google.com>
    azeemshaikh38 and azeemsgoogle authored Jun 8, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0b3cf46 View commit details
  3. Squashed commit of the following: (#414)

    commit 2c86d0ab69a3e34b4b45601b689a6e8ad8bb382e
    Author: Azeem Shaikh <azeems@google.com>
    Date:   Wed Jun 8 17:44:14 2022 +0000
    
        Only use `jq .` for non-default formats
    
    commit 53ba793
    Author: Azeem Shaikh <azeems@google.com>
    Date:   Wed Jun 8 17:17:09 2022 +0000
    
        Avoid error on `json` and `default` inputs
    
    Co-authored-by: Azeem Shaikh <azeems@google.com>
    azeemshaikh38 and azeemsgoogle authored Jun 8, 2022
    Copy the full SHA
    5cf8f62 View commit details
  4. docs: Add instructions on building/testing container image (#337)

    Signed-off-by: Stephen Augustus <foo@auggie.dev>
    justaugustus authored Jun 8, 2022
    Copy the full SHA
    e562ff0 View commit details
  5. 🌱 Bump github.com/ossf/scorecard/v4 from 4.3.0 to 4.3.1 (#327)

    Bumps [github.com/ossf/scorecard/v4](https://github.com/ossf/scorecard) from 4.3.0 to 4.3.1.
    - [Release notes](https://github.com/ossf/scorecard/releases)
    - [Changelog](https://github.com/ossf/scorecard/blob/main/.goreleaser.yml)
    - [Commits](ossf/scorecard@v4.3.0...v4.3.1)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/ossf/scorecard/v4
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 8, 2022
    Copy the full SHA
    05d0275 View commit details
  6. Use a longer timeout for CloudBuild (#416)

    Co-authored-by: Azeem Shaikh <azeems@google.com>
    azeemshaikh38 and azeemsgoogle authored Jun 8, 2022
    Copy the full SHA
    7ab69b4 View commit details
  7. Fix some diffs between Golang and current action (#431)

    Co-authored-by: Azeem Shaikh <azeems@google.com>
    azeemshaikh38 and azeemsgoogle authored Jun 8, 2022
    Copy the full SHA
    80c928c View commit details

Commits on Jun 9, 2022

  1. 🌱 Bump openssf/scorecard from 06e3ddd to 6224d1a (#439)

    Bumps openssf/scorecard from `06e3ddd` to `6224d1a`.
    
    ---
    updated-dependencies:
    - dependency-name: openssf/scorecard
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 9, 2022
    Copy the full SHA
    f056c0c View commit details

Commits on Jun 15, 2022

  1. 🌱 Bump github.com/ossf/scorecard/v4 from 4.3.1 to 4.4.0 (#454)

    Bumps [github.com/ossf/scorecard/v4](https://github.com/ossf/scorecard) from 4.3.1 to 4.4.0.
    - [Release notes](https://github.com/ossf/scorecard/releases)
    - [Changelog](https://github.com/ossf/scorecard/blob/main/.goreleaser.yml)
    - [Commits](ossf/scorecard@v4.3.1...v4.4.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/ossf/scorecard/v4
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 15, 2022
    Copy the full SHA
    66a8cbc View commit details
  2. 🌱 Bump debian from 06a93cb to 06a93cb (#432)

    Bumps debian from `06a93cb` to `06a93cb`.
    
    ---
    updated-dependencies:
    - dependency-name: debian
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
    dependabot[bot] and laurentsimon authored Jun 15, 2022
    Copy the full SHA
    1ca6c49 View commit details

Commits on Jun 16, 2022

  1. Get the Golang code in sync with Bash (#489)

    Co-authored-by: Azeem Shaikh <azeems@google.com>
    azeemshaikh38 and azeemsgoogle authored Jun 16, 2022
    Copy the full SHA
    f470ef7 View commit details

Commits on Jun 23, 2022

  1. 🌱 Bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (#523)

    Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0.
    - [Release notes](https://github.com/spf13/cobra/releases)
    - [Commits](spf13/cobra@v1.4.0...v1.5.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/spf13/cobra
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 23, 2022
    Copy the full SHA
    5cc5d09 View commit details
  2. 🌱 Bump debian from 06a93cb to f695745 (#536)

    Bumps debian from `06a93cb` to `f695745`.
    
    ---
    updated-dependencies:
    - dependency-name: debian
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
    dependabot[bot] and azeemshaikh38 authored Jun 23, 2022
    Copy the full SHA
    ed46015 View commit details

Commits on Jun 24, 2022

  1. 🌱 Bump actions/cache from 3.0.2 to 3.0.4 (#393)

    Bumps [actions/cache](https://github.com/actions/cache) from 3.0.2 to 3.0.4.
    - [Release notes](https://github.com/actions/cache/releases)
    - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
    - [Commits](actions/cache@48af2dc...c3f1317)
    
    ---
    updated-dependencies:
    - dependency-name: actions/cache
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
    dependabot[bot] and azeemshaikh38 authored Jun 24, 2022
    Copy the full SHA
    fe5d183 View commit details
  2. 🌱 Bump github/codeql-action from 2.1.11 to 2.1.12 (#339)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.11 to 2.1.12.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
    - [Commits](github/codeql-action@a3a6c12...27ea8f8)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 24, 2022
    Copy the full SHA
    f8cb15a View commit details
  3. 🌱 Bump github.com/sigstore/cosign from 1.8.0 to 1.9.0 (#331)

    Bumps [github.com/sigstore/cosign](https://github.com/sigstore/cosign) from 1.8.0 to 1.9.0.
    - [Release notes](https://github.com/sigstore/cosign/releases)
    - [Changelog](https://github.com/sigstore/cosign/blob/main/CHANGELOG.md)
    - [Commits](sigstore/cosign@v1.8.0...v1.9.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/sigstore/cosign
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 24, 2022
    Copy the full SHA
    85bc05a View commit details

Commits on Jun 27, 2022

  1. Get repo info from REST API if event file is unavailable (#576)

    Co-authored-by: Azeem Shaikh <azeems@google.com>
    azeemshaikh38 and azeemsgoogle authored Jun 27, 2022
    Copy the full SHA
    2e062bc View commit details
  2. ✨ use GITHUB_TOKEN when repo_token is empty on PRs (#335)

    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * update
    
    * test
    
    * updates
    
    * updates
    laurentsimon authored Jun 27, 2022
    Copy the full SHA
    ce330fd View commit details
Showing with 1,087 additions and 371 deletions.
  1. +1 −0 .dockerignore
  2. +3 −3 .github/workflows/codeql-analysis.yml
  3. +1 −1 .github/workflows/golangci.yml
  4. +2 −2 .github/workflows/tests.yaml
  5. +1 −0 .gitignore
  6. +4 −11 Dockerfile
  7. +51 −0 Dockerfile.golang
  8. +2 −1 Makefile
  9. +1 −1 README.md
  10. +5 −0 action.yaml
  11. +22 −0 cloudbuild.yaml
  12. +279 −0 docs/development.md
  13. +51 −15 e2e/README.md
  14. +18 −9 entrypoint.sh
  15. +11 −14 entrypoint/entrypoint.go
  16. +64 −66 github/github.go
  17. +43 −41 go.mod
  18. +107 −61 go.sum
  19. +2 −1 main.go
  20. +6 −4 options/env.go
  21. +131 −107 options/options.go
  22. +88 −22 options/options_test.go
  23. +173 −0 options/testdata/public.json
  24. +17 −9 signing/signing.go
  25. +3 −2 signing/signing_test.go
  26. +1 −1 signing/testdata/results.json
1 change: 1 addition & 0 deletions .dockerignore
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # v2.1.11
uses: github/codeql-action/init@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # v2.1.11
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # v2.1.11
uses: github/codeql-action/autobuild@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # v2.1.11

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # v2.1.11
uses: github/codeql-action/analyze@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # v2.1.11
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 #v2.4.0
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 #v2.1.7
- uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d #v2.1.7
with:
# In order:
# * Module download cache
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 #v2.4.0
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 #v2.1.7
- uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d #v2.1.7
with:
# In order:
# * Module download cache
@@ -55,7 +55,7 @@ jobs:
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 #v2.4.0
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 #v2.1.7
- uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d #v2.1.7
with:
# In order:
# * Module download cache
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Testing
unit-coverage.out
scorecard-action
output/
15 changes: 4 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -12,20 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Testing: docker run -e GITHUB_REF=refs/heads/main \
# -e GITHUB_EVENT_NAME=branch_protection_rule \
# -e INPUT_RESULTS_FORMAT=sarif \
# -e INPUT_RESULTS_FILE=results.sarif \
# -e GITHUB_WORKSPACE=/ \
# -e INPUT_POLICY_FILE="/policy.yml" \
# -e INPUT_REPO_TOKEN=$GITHUB_AUTH_TOKEN \
# -e GITHUB_REPOSITORY="ossf/scorecard" \
# laurentsimon/scorecard-action:latest
FROM gcr.io/openssf/scorecard:v4.3.1@sha256:06e3ddde7f63619813c5749389010b596e753fa070c524a42fd0de756f96970f as base
# See docs/development.md for details on how to test this image.

FROM gcr.io/openssf/scorecard:v4.3.1@sha256:6224d1a27c35e7b216befba798cb782adb400047caa60fc1bea30030da392a1b as base

# Build our image and update the root certs.
# TODO: use distroless.
FROM debian:11.3-slim@sha256:06a93cbdd49a265795ef7b24fe374fee670148a7973190fb798e43b3cf7c5d0f
FROM debian:11.3-slim@sha256:f6957458017ec31c4e325a76f39d6323c4c21b0e31572efa006baa927a160891
RUN apt-get update && \
apt-get install -y --no-install-recommends \
jq ca-certificates curl
51 changes: 51 additions & 0 deletions Dockerfile.golang
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2021 Security Scorecard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Testing: docker run -e GITHUB_REF=refs/heads/main \
# -e GITHUB_EVENT_NAME=branch_protection_rule \
# -e INPUT_RESULTS_FORMAT=sarif \
# -e INPUT_RESULTS_FILE=results.sarif \
# -e GITHUB_WORKSPACE=/ \
# -e INPUT_POLICY_FILE="/policy.yml" \
# -e INPUT_REPO_TOKEN=$GITHUB_AUTH_TOKEN \
# -e GITHUB_REPOSITORY="ossf/scorecard" \
# laurentsimon/scorecard-action:latest

#v1.17 go
FROM golang@sha256:bd9823cdad5700fb4abe983854488749421d5b4fc84154c30dae474100468b85 AS base
WORKDIR /src
ENV CGO_ENABLED=0
COPY go.* ./
RUN go mod download
COPY . ./

FROM base AS build
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 make build

# TODO: use distroless:
# FROM gcr.io/distroless/base:nonroot@sha256:02f667185ccf78dbaaf79376b6904aea6d832638e1314387c2c2932f217ac5cb
FROM debian:11.3-slim@sha256:f6957458017ec31c4e325a76f39d6323c4c21b0e31572efa006baa927a160891

RUN apt-get update && \
apt-get install -y --no-install-recommends \
# For debugging.
jq ca-certificates curl
COPY --from=build /src/scorecard-action /

# Copy a test policy for local testing.
COPY policies/template.yml /policy.yml

ENTRYPOINT [ "/scorecard-action" ]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
LDFLAGS=-w -extldflags
# NOTE: Keep this in sync with go.mod for ossf/scorecard.
LDFLAGS=-X sigs.k8s.io/release-utils/version.gitVersion=v4.3.1 -X sigs.k8s.io/release-utils/version.gitCommit=70d045b9ef00e7171ce3950aca38eef6ea4d7308 -w -extldflags \"-static\"

build: ## Runs go build on repo
# Run go build and generate scorecard executable
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -173,7 +173,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@5c8bc69dc88b65c66584e07611df79d3579b0377 # v1.1.0
uses: ossf/scorecard-action@3e15ea8318eee9b333819ec77a36aca8d39df13e # v1.1.1
with:
results_file: results.sarif
results_format: sarif
5 changes: 5 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -37,6 +37,11 @@ inputs:
required: false
default: false

internal_default_token:
description: "INPUT: Default GitHub token. (Internal purpose only, not intended for developers to set. Used for pull requests configured with a PAT)."
required: false
default: ${{ github.token }}

branding:
icon: "mic"
color: "white"
22 changes: 22 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 Security Scorecard Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '.',
'-t', 'gcr.io/openssf/scorecard-action:latest',
'-t', 'gcr.io/openssf/scorecard-action:$COMMIT_SHA',
'-f', 'Dockerfile.golang']
images: ['gcr.io/openssf/scorecard-action']
timeout: '1600s'
Loading