Skip to content

Commit 1216cf5

Browse files
chore: synced file(s) with cds-snc/site-reliability-engineering (#67)
* chore: synced local '.github/workflows/s3-backup.yml' with remote 'tools/sre_file_sync/s3-backup.yml' * chore: synced local '.github/workflows/export_github_data.yml' with remote 'tools/sre_file_sync/export_github_data.yml' * chore: synced local '.github/workflows/backstage-catalog-helper.yml' with remote 'tools/sre_file_sync/backstage-catalog-helper.yml' * chore: synced local '.github/workflows/ossf-scorecard.yml' with remote 'tools/sre_file_sync/ossf-scorecard.yml' --------- Co-authored-by: sre-read-write[bot] <92993749+sre-read-write[bot]@users.noreply.github.com>
1 parent 5cd1ae6 commit 1216cf5

File tree

4 files changed

+37
-16
lines changed

4 files changed

+37
-16
lines changed

.github/workflows/backstage-catalog-helper.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Backstage Catalog Info Helper
22
on:
33
workflow_dispatch:
4-
schedule:
5-
- cron: "0 0 * * *"
64

75
jobs:
86
update-catalog-info:
@@ -12,8 +10,9 @@ jobs:
1210
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
1311
with:
1412
fetch-depth: 0
13+
persist-credentials: false
1514
- name: Run Backstage Catalog Info Helper
16-
uses: cds-snc/[email protected]
15+
uses: cds-snc/backstage-catalog-info-helper-action@cc75afc29a0ade6c41400132ff9e1222f8916ba6 # v0.3.1
1716
with:
1817
github_app_id: ${{ secrets.SRE_BOT_RW_APP_ID }}
1918
github_app_private_key: ${{ secrets.SRE_BOT_RW_PRIVATE_KEY }}
@@ -25,9 +24,10 @@ jobs:
2524
app_id: ${{ secrets.SRE_BOT_RW_APP_ID }}
2625
private_key: ${{ secrets.SRE_BOT_RW_PRIVATE_KEY }}
2726
- name: Create pull request
28-
uses: peter-evans/create-pull-request@v3
27+
uses: peter-evans/create-pull-request@6cd32fd93684475c31847837f87bb135d40a2b79 # v7.0.3
2928
with:
3029
token: ${{ steps.generate_token.outputs.token}}
30+
sign-commits: true
3131
commit-message: 'Add catalog-info.yaml'
3232
branch: 'backstage/catalog-info'
3333
title: 'Add catalog-info.yaml'

.github/workflows/export_github_data.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,37 @@ on:
44
schedule:
55
- cron: "20 7 * * *"
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
issues: read
11+
pull-requests: read
12+
security-events: read
13+
714
jobs:
815
export-data:
916
runs-on: ubuntu-latest
1017
steps:
1118
- name: Audit DNS requests
12-
uses: cds-snc/dns-proxy-action@main
19+
uses: cds-snc/dns-proxy-action@2aee21aebfddefac5839497648a36a9f84342d8b
1320
env:
1421
DNS_PROXY_FORWARDTOSENTINEL: "true"
1522
DNS_PROXY_LOGANALYTICSWORKSPACEID: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
1623
DNS_PROXY_LOGANALYTICSSHAREDKEY: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
17-
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- name: Configure AWS credentials using OIDC
26+
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
27+
with:
28+
role-to-assume: arn:aws:iam::739275439843:role/data-lake-github-data-export
29+
role-session-name: GithubDataExport
30+
aws-region: ca-central-1
1831
- name: Export Data
19-
uses: cds-snc/github-repository-metadata-exporter@main
32+
uses: cds-snc/github-repository-metadata-exporter@9a1f3a278fbde200c2b90c3e409a61ebda208fdc
2033
with:
2134
github-app-id: ${{ secrets.SRE_BOT_RO_APP_ID }}
2235
github-app-installation-id: ${{ secrets.SRE_BOT_RO_INSTALLATION_ID }}
2336
github-app-private-key: ${{ secrets.SRE_BOT_RO_PRIVATE_KEY }}
2437
log-analytics-workspace-id: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
2538
log-analytics-workspace-key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
39+
s3-bucket: ${{ secrets.DATA_LAKE_GITHUB_METADATA_EXPORT_S3_BUCKET }}
40+
aws-region: ${{ secrets.DATA_LAKE_GITHUB_METADATA_EXPORT_AWS_REGION }}

.github/workflows/ossf-scorecard.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@ on:
88
branches:
99
- main
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
13+
issues: read
14+
pull-requests: read
15+
checks: read
16+
actions: read
1217

1318
jobs:
1419
analysis:
1520
name: Scorecards analysis
1621
runs-on: ubuntu-latest
17-
permissions:
18-
actions: read
19-
contents: read
2022

2123
steps:
2224
- name: "Checkout code"
23-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2426
with:
2527
persist-credentials: false
2628

2729
- name: "Run analysis"
28-
uses: ossf/scorecard-action@0a8153a7e8d76932ff5903ccdbed894237ef223d
30+
uses: ossf/scorecard-action@169c9b9248e36d400bebded8160c7fe2cbbc7762
2931
with:
3032
results_file: ossf-results.json
3133
results_format: json
@@ -39,7 +41,7 @@ jobs:
3941
jq -c '. + {"metadata_owner": "'$OWNER'", "metadata_repo": "'$REPO'", "metadata_query": "ossf"}' ossf-results.json > ossf-results-modified.json
4042
4143
- name: "Post results to Sentinel"
42-
uses: cds-snc/sentinel-forward-data-action@main
44+
uses: cds-snc/sentinel-forward-data-action@01db4a9203054ecdb60ff368c3cdfca71d62e85f
4345
with:
4446
file_name: ossf-results-modified.json
4547
log_type: GitHubMetadata_OSSF_Scorecard

.github/workflows/s3-backup.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ on:
44
schedule:
55
- cron: "0 6 * * *"
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
s3-backup:
912
runs-on: ubuntu-latest
1013
steps:
1114

1215
- name: Checkout
13-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1417
with:
1518
fetch-depth: 0 # retrieve all history
19+
persist-credentials: false
1620

1721
- name: Configure AWS credentials
18-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
22+
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
1923
with:
2024
aws-access-key-id: ${{ secrets.AWS_S3_BACKUP_ACCESS_KEY_ID }}
2125
aws-secret-access-key: ${{ secrets.AWS_S3_BACKUP_SECRET_ACCESS_KEY }}

0 commit comments

Comments
 (0)