Skip to content

Commit

Permalink
[StepSecurity] Apply security best practices (#877)
Browse files Browse the repository at this point in the history
* [StepSecurity] Apply security best practices

Signed-off-by: StepSecurity Bot <[email protected]>

* Update linuxTriage.yml

* Delete .github/workflows/codeql.yml

* Update README.md

* Update README.md

---------

Signed-off-by: StepSecurity Bot <[email protected]>
Co-authored-by: George Adams <[email protected]>
  • Loading branch information
step-security-bot and gdams authored Apr 26, 2024
1 parent a266a7b commit 197b112
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,48 @@ updates:
schedule:
interval: "daily"
open-pull-requests-limit: 10

- package-ecosystem: docker
directory: /linux/ca-certificates/debian/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jdk/alpine/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jdk/debian/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jdk/redhat/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jdk/suse/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jre/alpine/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jre/debian/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jre/redhat/src/main/packaging
schedule:
interval: daily

- package-ecosystem: docker
directory: /linux/jre/suse/src/main/packaging
schedule:
interval: daily
5 changes: 5 additions & 0 deletions .github/workflows/cacert-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
working-directory: ./linux

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linuxTriage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
- uses: dorny/test-reporter@c40d89d5e987cd80f3a32b3c233556e22bdca958 # v1.9.0
with:
artifact: test-results # artifact name
name: JUnit Test Report # Name of the check run which will be created
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '20 7 * * 2'
push:
branches: ["master"]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
contents: read
actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ceaec5c11a131e0d282ff3b6f095917d234caace # v2.25.3
with:
sarif_file: results.sarif
3 changes: 3 additions & 0 deletions .github/workflows/wix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
paths:
- .github/workflows/wix.yml
- wix/**
permissions:
contents: read

jobs:
wix:
strategy:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Adoptium Installers

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/adoptium/installer/badge)](https://api.securityscorecards.dev/projects/github.com/adoptium/installer)

Repository for creating installable packages for Eclipse Adoptium based releases.

The packages are created using:
Expand Down

0 comments on commit 197b112

Please sign in to comment.