Skip to content
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

CI run for PR #10479 #10496

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
  • Loading branch information
step-security-bot committed Jan 22, 2025
commit c4f3de5d750ed64d74bab2a1c7d182866564aaad
96 changes: 96 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: cargo
directory: /
schedule:
interval: daily

- package-ecosystem: docker
directory: /
schedule:
interval: daily

- package-ecosystem: docker
directory: /docker-compose/compute_wrapper
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/csharp/npgsql
schedule:
interval: daily

- package-ecosystem: nuget
directory: /test_runner/pg_clients/csharp/npgsql
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/java/jdbc
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/python/asyncpg
schedule:
interval: daily

- package-ecosystem: pip
directory: /test_runner/pg_clients/python/asyncpg
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/python/pg8000
schedule:
interval: daily

- package-ecosystem: pip
directory: /test_runner/pg_clients/python/pg8000
schedule:
interval: daily

- package-ecosystem: cargo
directory: /test_runner/pg_clients/rust/tokio-postgres
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/rust/tokio-postgres
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/swift/PostgresClientKitExample
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/swift/PostgresNIOExample
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/typescript/postgresql-client
schedule:
interval: daily

- package-ecosystem: npm
directory: /test_runner/pg_clients/typescript/postgresql-client
schedule:
interval: daily

- package-ecosystem: docker
directory: /test_runner/pg_clients/typescript/serverless-driver
schedule:
interval: daily

- package-ecosystem: npm
directory: /test_runner/pg_clients/typescript/serverless-driver
schedule:
interval: daily
12 changes: 10 additions & 2 deletions .github/workflows/_benchmarking_preparation.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@ defaults:
run:
shell: bash -euxo pipefail {0}

permissions:
contents: read

jobs:
setup-databases:
permissions:
@@ -34,6 +37,11 @@ jobs:
options: --init

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

- name: Set up Connection String
id: set-up-prep-connstr
run: |
@@ -55,10 +63,10 @@ jobs:

echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT

- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-region: eu-central-1
role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
27 changes: 20 additions & 7 deletions .github/workflows/_build-and-test-locally.yml
Original file line number Diff line number Diff line change
@@ -32,6 +32,9 @@ env:
RUST_BACKTRACE: 1
COPT: '-Werror'

permissions:
contents: read

jobs:
build-neon:
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.arch == 'arm64' && 'large-arm64' || 'large')) }}
@@ -54,7 +57,12 @@ jobs:
BUILD_TAG: ${{ inputs.build-tag }}

steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

@@ -108,28 +116,28 @@ jobs:

- name: Cache postgres v14 build
id: cache_pg_14
uses: actions/cache@v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: pg_install/v14
key: v1-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build-type }}-pg-${{ steps.pg_v14_rev.outputs.pg_rev }}-bookworm-${{ hashFiles('Makefile', 'build-tools.Dockerfile') }}

- name: Cache postgres v15 build
id: cache_pg_15
uses: actions/cache@v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: pg_install/v15
key: v1-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build-type }}-pg-${{ steps.pg_v15_rev.outputs.pg_rev }}-bookworm-${{ hashFiles('Makefile', 'build-tools.Dockerfile') }}

- name: Cache postgres v16 build
id: cache_pg_16
uses: actions/cache@v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: pg_install/v16
key: v1-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build-type }}-pg-${{ steps.pg_v16_rev.outputs.pg_rev }}-bookworm-${{ hashFiles('Makefile', 'build-tools.Dockerfile') }}

- name: Cache postgres v17 build
id: cache_pg_17
uses: actions/cache@v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: pg_install/v17
key: v1-${{ runner.os }}-${{ runner.arch }}-${{ inputs.build-type }}-pg-${{ steps.pg_v17_rev.outputs.pg_rev }}-bookworm-${{ hashFiles('Makefile', 'build-tools.Dockerfile') }}
@@ -207,7 +215,7 @@ jobs:
fi

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-region: eu-central-1
role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
@@ -291,7 +299,12 @@ jobs:
fail-fast: false
matrix: ${{ fromJSON(format('{{"include":{0}}}', inputs.test-cfg)) }}
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

12 changes: 10 additions & 2 deletions .github/workflows/_check-codestyle-python.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@ defaults:
run:
shell: bash -euxo pipefail {0}

permissions:
contents: read

jobs:
check-codestyle-python:
runs-on: [ self-hosted, small ]
@@ -23,9 +26,14 @@ jobs:
options: --init

steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/cache@v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.cache/pypoetry/virtualenvs
key: v2-${{ runner.os }}-${{ runner.arch }}-python-deps-bookworm-${{ hashFiles('poetry.lock') }}
12 changes: 10 additions & 2 deletions .github/workflows/_check-codestyle-rust.yml
Original file line number Diff line number Diff line change
@@ -16,6 +16,9 @@ defaults:
run:
shell: bash -euxo pipefail {0}

permissions:
contents: read

jobs:
check-codestyle-rust:
strategy:
@@ -31,13 +34,18 @@ jobs:
options: --init

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

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

- name: Cache cargo deps
uses: actions/cache@v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: |
~/.cargo/registry
10 changes: 9 additions & 1 deletion .github/workflows/_create-release-pr.yml
Original file line number Diff line number Diff line change
@@ -20,6 +20,9 @@ defaults:
run:
shell: bash -euo pipefail {0}

permissions:
contents: read

jobs:
create-release-branch:
runs-on: ubuntu-22.04
@@ -28,7 +31,12 @@ jobs:
contents: write # for `git push`

steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: main

8 changes: 8 additions & 0 deletions .github/workflows/_push-to-acr.yml
Original file line number Diff line number Diff line change
@@ -27,6 +27,9 @@ on:
required: true
type: string

permissions:
contents: read

jobs:
push-to-acr:
runs-on: ubuntu-22.04
@@ -35,6 +38,11 @@ jobs:
id-token: write # This is required for Azure Login to work.

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

- name: Azure login
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # @v2.1.1
with:
9 changes: 7 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -26,8 +26,13 @@ jobs:
needs: [ check-permissions ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-actionlint@v1
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: reviewdog/action-actionlint@abd537417cf4991e1ba8e21a67b1119f4f53b8e0 # v1.64.1
env:
# SC2046 - Quote this to prevent word splitting. - https://www.shellcheck.net/wiki/SC2046
# SC2086 - Double quote to prevent globbing and word splitting. - https://www.shellcheck.net/wiki/SC2086
17 changes: 16 additions & 1 deletion .github/workflows/approved-for-ci-run.yml
Original file line number Diff line number Diff line change
@@ -47,6 +47,11 @@ jobs:
runs-on: ubuntu-22.04

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

- run: gh pr --repo "${GITHUB_REPOSITORY}" edit "${PR_NUMBER}" --remove-label "approved-for-ci-run"

create-or-update-pr-for-ci-run:
@@ -63,9 +68,14 @@ jobs:
runs-on: ubuntu-22.04

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

- run: gh pr --repo "${GITHUB_REPOSITORY}" edit "${PR_NUMBER}" --remove-label "approved-for-ci-run"

- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: main
token: ${{ secrets.CI_ACCESS_TOKEN }}
@@ -155,6 +165,11 @@ jobs:
runs-on: ubuntu-22.04

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

- name: Close PR and delete `ci-run/pr-${{ env.PR_NUMBER }}` branch
run: |
CLOSED="$(gh pr --repo ${GITHUB_REPOSITORY} list --head ${BRANCH} --json 'closed' --jq '.[].closed')"
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.