generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: synced file(s) with cds-snc/site-reliability-engineering #7
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
Open
sre-read-write
wants to merge
4
commits into
main
Choose a base branch
from
repo-sync/site-reliability-engineering/default
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
af11b97
chore: synced local '.github/workflows/s3-backup.yml' with remote 'to…
sre-read-write[bot] 3cb0fa6
chore: created local '.github/workflows/export_github_data.yml' from …
sre-read-write[bot] 93d80d6
chore: created local '.github/workflows/backstage-catalog-helper.yml'…
sre-read-write[bot] d66b450
chore: created local '.github/workflows/ossf-scorecard.yml' from remo…
sre-read-write[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Backstage Catalog Info Helper | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| update-catalog-info: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Actions | ||
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Run Backstage Catalog Info Helper | ||
| uses: cds-snc/backstage-catalog-info-helper-action@cc75afc29a0ade6c41400132ff9e1222f8916ba6 # v0.3.1 | ||
| with: | ||
| github_app_id: ${{ secrets.SRE_BOT_RW_APP_ID }} | ||
| github_app_private_key: ${{ secrets.SRE_BOT_RW_PRIVATE_KEY }} | ||
| github_organization: cds-snc | ||
| - name: impersonate Read/Write GH App | ||
| uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a | ||
| id: generate_token | ||
| with: | ||
| app_id: ${{ secrets.SRE_BOT_RW_APP_ID }} | ||
| private_key: ${{ secrets.SRE_BOT_RW_PRIVATE_KEY }} | ||
| - name: Create pull request | ||
| uses: peter-evans/create-pull-request@6cd32fd93684475c31847837f87bb135d40a2b79 # v7.0.3 | ||
| with: | ||
| token: ${{ steps.generate_token.outputs.token}} | ||
| sign-commits: true | ||
| commit-message: 'Add catalog-info.yaml' | ||
| branch: 'backstage/catalog-info' | ||
| title: 'Add catalog-info.yaml' | ||
| body: 'Adding a basic catalog-info.yaml to start populating the backstage catalog with your components.' | ||
| labels: 'backstage' | ||
| add-paths: | | ||
| catalog-info.yaml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: GitHub repository metadata exporter | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "20 7 * * *" | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| issues: read | ||
| pull-requests: read | ||
| security-events: read | ||
|
|
||
| jobs: | ||
| export-data: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Audit DNS requests | ||
| uses: cds-snc/dns-proxy-action@2aee21aebfddefac5839497648a36a9f84342d8b | ||
| env: | ||
| DNS_PROXY_FORWARDTOSENTINEL: "true" | ||
| DNS_PROXY_LOGANALYTICSWORKSPACEID: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }} | ||
| DNS_PROXY_LOGANALYTICSSHAREDKEY: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }} | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - name: Configure AWS credentials using OIDC | ||
| uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1 | ||
| with: | ||
| role-to-assume: arn:aws:iam::739275439843:role/data-lake-github-data-export | ||
| role-session-name: GithubDataExport | ||
| aws-region: ca-central-1 | ||
| - name: Export Data | ||
| uses: cds-snc/github-repository-metadata-exporter@531ae86f67b4c0aa1a40229571211ef73109bda2 | ||
| with: | ||
| github-app-id: ${{ secrets.SRE_BOT_RO_APP_ID }} | ||
| github-app-installation-id: ${{ secrets.SRE_BOT_RO_INSTALLATION_ID }} | ||
| github-app-private-key: ${{ secrets.SRE_BOT_RO_PRIVATE_KEY }} | ||
| log-analytics-workspace-id: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }} | ||
| log-analytics-workspace-key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }} | ||
| s3-bucket: ${{ secrets.DATA_LAKE_GITHUB_METADATA_EXPORT_S3_BUCKET }} | ||
| aws-region: ${{ secrets.DATA_LAKE_GITHUB_METADATA_EXPORT_AWS_REGION }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Scorecards supply-chain security | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| # Weekly on Saturdays. | ||
| - cron: "30 1 * * 6" | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: read | ||
| pull-requests: read | ||
| checks: read | ||
| actions: read | ||
|
|
||
| jobs: | ||
| analysis: | ||
| name: Scorecards analysis | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: "Checkout code" | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: "Run analysis" | ||
| uses: ossf/scorecard-action@169c9b9248e36d400bebded8160c7fe2cbbc7762 | ||
| with: | ||
| results_file: ossf-results.json | ||
| results_format: json | ||
| publish_results: false | ||
|
|
||
| - name: "Add metadata" | ||
| run: | | ||
| full_repo="${{ github.repository }}" | ||
| OWNER=${full_repo%/*} | ||
| REPO=${full_repo#*/} | ||
| jq -c '. + {"metadata_owner": "'$OWNER'", "metadata_repo": "'$REPO'", "metadata_query": "ossf"}' ossf-results.json > ossf-results-modified.json | ||
|
|
||
| - name: "Post results to Sentinel" | ||
| uses: cds-snc/sentinel-forward-data-action@01db4a9203054ecdb60ff368c3cdfca71d62e85f | ||
| with: | ||
| file_name: ossf-results-modified.json | ||
| log_type: GitHubMetadata_OSSF_Scorecard | ||
| log_analytics_workspace_id: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }} | ||
| log_analytics_workspace_key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.