Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
[backport] PSS global flag
Browse files Browse the repository at this point in the history
  • Loading branch information
whites11 committed Apr 22, 2024
1 parent 4e0c228 commit eaef801
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 135 deletions.
134 changes: 0 additions & 134 deletions .circleci/config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Checklist

- [ ] Update changelog in CHANGELOG.md.
78 changes: 78 additions & 0 deletions .github/workflows/zz_generated.run_ossf_scorecard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# DO NOT EDIT. Generated with:
#
# [email protected]
#

# 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: '15 15 15 * *'
push:
branches: [ "main", "master" ]
workflow_dispatch: {}

# 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
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
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 Scorecard 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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
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@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
sarif_file: results.sarif
13 changes: 12 additions & 1 deletion .nancy-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,15 @@ CVE-2023-25809
CVE-2023-28642
CVE-2023-26125
CVE-2023-29401
CVE-2023-32731
CVE-2023-32731

CVE-2023-47090
CVE-2024-21626
CVE-2023-47108
CVE-2023-48795
CVE-2023-39325
CVE-2023-3978
CVE-2024-24786
CVE-2019-25210
CVE-2024-26147
CVE-2024-25620
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- [Bacport] Add global.podSecurityStandards.enforced value for PSS migration.

## [14.17.1-patch3] - 2023-07-27

### Changed
Expand Down
2 changes: 2 additions & 0 deletions helm/aws-operator/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down Expand Up @@ -32,3 +33,4 @@ spec:
hostNetwork: false
hostIPC: false
hostPID: false
{{- end }}
2 changes: 2 additions & 0 deletions helm/aws-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ roleRef:
name: {{ include "resource.default.name" . }}
apiGroup: rbac.authorization.k8s.io
---
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -196,3 +197,4 @@ roleRef:
kind: ClusterRole
name: {{ include "resource.psp.name" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
13 changes: 13 additions & 0 deletions helm/aws-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,19 @@
}
}
}
},
"global": {
"type": "object",
"properties": {
"podSecurityStandards": {
"type": "object",
"properties": {
"enforced": {
"type": "boolean"
}
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions helm/aws-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,7 @@ securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault

global:
podSecurityStandards:
enforced: false

0 comments on commit eaef801

Please sign in to comment.