From aa65fcdd4b17d238e4f6f0155d75175a38072c9a Mon Sep 17 00:00:00 2001 From: "quant-ranger[bot]" <132915763+quant-ranger[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 00:09:31 +0000 Subject: [PATCH 1/3] Update copier template to v0.4.1 --- .copier-answers.yml | 2 +- .gitattributes | 4 ++ .github/workflows/build.yml | 2 + .github/workflows/ci.yml | 5 +++ .github/workflows/scorecard.yml | 79 +++++++++++++++++++++++++++++++++ SECURITY.md | 7 +++ 6 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/scorecard.yml create mode 100644 SECURITY.md diff --git a/.copier-answers.yml b/.copier-answers.yml index 77971cd..421d62f 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # This file is managed by Copier; DO NOT EDIT OR REMOVE. -_commit: v0.3.0 +_commit: v0.4.1 _src_path: https://github.com/quantco/copier-template-python-open-source add_autobump_workflow: false author_email: oliver.borchert@quantco.com diff --git a/.gitattributes b/.gitattributes index b39d670..cc4aa5d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +<<<<<<< before updating pixi.lock linguist-language=YAML linguist-generated=true * text=auto @@ -6,3 +7,6 @@ pixi.lock linguist-language=YAML linguist-generated=true *.{py,yaml,yml,sh} text eol=lf *.bat text eol=crlf +======= +pixi.lock merge=binary linguist-language=YAML linguist-generated=true +>>>>>>> after updating diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4c7f39..f81d0c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f005c7..2ababc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,14 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +<<<<<<< before updating defaults: run: shell: bash -el {0} +======= +permissions: + contents: read +>>>>>>> after updating jobs: pre-commit: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000..85202e5 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,79 @@ +# 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: "34 5 * * 0" + workflow_dispatch: + push: + branches: ["main"] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled. + if: (github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request') && github.repository == 'quantco/sqlcompyre' + 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.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?tab=readme-ov-file#authentication-with-fine-grained-pat-optional. + # 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 + + # (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore + # file_mode: git + + # 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard (optional). + # Commenting out will disable upload of results to your repo's Code Scanning dashboard + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 + with: + sarif_file: results.sarif diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..6e66270 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Reporting Security Issues + +We take security bugs in our projects seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. + +To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/quantco/sqlcompyre/security/advisories/new) tab. + +We will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance. From 6c84fb31320bdc0689cbe82c5f6436610d92da04 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Tue, 10 Jun 2025 11:32:19 +0200 Subject: [PATCH 2/3] Update --- .gitattributes | 12 +----------- .github/workflows/ci.yml | 6 ------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.gitattributes b/.gitattributes index cc4aa5d..d1bfbbe 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,12 +1,2 @@ -<<<<<<< before updating -pixi.lock linguist-language=YAML linguist-generated=true - -* text=auto - -*.{diff,patch} binary - -*.{py,yaml,yml,sh} text eol=lf -*.bat text eol=crlf -======= pixi.lock merge=binary linguist-language=YAML linguist-generated=true ->>>>>>> after updating + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ababc6..a41b27a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,14 +9,8 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -<<<<<<< before updating -defaults: - run: - shell: bash -el {0} -======= permissions: contents: read ->>>>>>> after updating jobs: pre-commit: From e5c49c1c4946d97a37a596a701d73eb2eb27b713 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Tue, 10 Jun 2025 11:36:51 +0200 Subject: [PATCH 3/3] Update pch --- .gitattributes | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index d1bfbbe..ba44862 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ pixi.lock merge=binary linguist-language=YAML linguist-generated=true -