Skip to content

Commit 34246c5

Browse files
chore: synced file(s) with cds-snc/site-reliability-engineering (#466)
* 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 9a07d6a commit 34246c5

4 files changed

Lines changed: 27 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
1111
with:
1212
fetch-depth: 0
13+
persist-credentials: false
1314
- name: Run Backstage Catalog Info Helper
1415
uses: cds-snc/backstage-catalog-info-helper-action@cc75afc29a0ade6c41400132ff9e1222f8916ba6 # v0.3.1
1516
with:

.github/workflows/export_github_data.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ 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
@@ -15,11 +22,19 @@ jobs:
1522
DNS_PROXY_LOGANALYTICSWORKSPACEID: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
1623
DNS_PROXY_LOGANALYTICSSHAREDKEY: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
1724
- 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@7f8f3eccaf3e15675fc70611e913ec1458510540
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ 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"

.github/workflows/s3-backup.yml

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

7+
permissions:
8+
contents: read
9+
710
jobs:
811
s3-backup:
912
runs-on: ubuntu-latest
@@ -13,6 +16,7 @@ jobs:
1316
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
1822
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0

0 commit comments

Comments
 (0)