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: Apply CodeQL workflow fixes #1319

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ concurrency:
group: ${{ inputs.environment }}
cancel-in-progress: true

permissions:
contents: write
packages: write

jobs:
build:
runs-on: ubuntu-latest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
env:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
contents: read

jobs:
deploy:
name: Cloudflare Pages
Expand All @@ -28,7 +31,7 @@
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1.207.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Deploy website' step
Uses Step
uses 'ruby/setup-ruby' with ref 'v1.207.0', not a pinned commit hash
with:
ruby-version: 3.3

Expand All @@ -40,7 +43,7 @@
run: echo "version=$(date +'%Y.%m.%d')-${{ github.run_number }}" >> $GITHUB_OUTPUT

- name: Replace cache markers
uses: jacobtomlinson/gha-find-replace@v3
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
with:
find: "YYYY.MM.DD"
replace: "${{ steps.tag.outputs.version }}"
Expand All @@ -60,7 +63,7 @@

- name: Publish to Cloudflare Pages
id: deploy
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@v3.1.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Deploy website' step
Uses Step: deploy
uses 'cloudflare/wrangler-action' with ref 'v3.1.0', not a pinned commit hash
with:
apiToken: ${{ secrets.CLOUDFLARE_API_KEY }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/lint-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
runs-on: ubuntu-latest

steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@v5.1.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Pull request' step
Uses Step: lint_pr_title
uses 'amannn/action-semantic-pull-request' with ref 'v5.1.0', not a pinned commit hash
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -29,7 +29,7 @@
bot
dependencies

- uses: marocchino/sticky-pull-request-comment@v2
- uses: marocchino/sticky-pull-request-comment@v2.1.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Pull request' step
Uses Step
uses 'marocchino/sticky-pull-request-comment' with ref 'v2.1.0', not a pinned commit hash
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
Expand Down Expand Up @@ -60,25 +60,25 @@
- `style: Format trading strategy classes`
- `refactor: Restructure trading engine components`
- `perf: Optimize trade order execution flow`

#### Documentation & testing
- `docs: Update API documentation`
- `test: Add unit tests for sign-in flow`

#### Infrastructure
- `build: Update .NET SDK version to 8.0`
- `ci: Add workflow for performance testing`
- `chore: Update NuGet dependencies`

#### Other
- `revert: Remove faulty market data provider`

See [Conventional Commits](https://www.conventionalcommits.org) for more details.
</details>

# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@v2.1.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Pull request' step
Uses Step
uses 'marocchino/sticky-pull-request-comment' with ref 'v2.1.0', not a pinned commit hash
with:
header: pr-title-lint-error
delete: true
2 changes: 1 addition & 1 deletion .github/workflows/lock-issues-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
timeout-minutes: 10

steps:
- uses: dessant/lock-threads@v5
- uses: dessant/lock-threads@v5.0.1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Lock closed threads' step
Uses Step
uses 'dessant/lock-threads' with ref 'v5.0.1', not a pinned commit hash
with:
process-only: issues, prs
issue-inactive-days: "90"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
- docs/examples/**
- ".github/workflows/test-examples.yml"

permissions:
contents: read

jobs:
build:
name: build
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-indicators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
branches: ["*"]
workflow_dispatch:

permissions:
contents: read # Required for checkout
actions: read # Required for workflow runs
checks: write # Required for test results

jobs:
test:
name: unit tests
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ concurrency:

on: workflow_dispatch

permissions:
contents: read

jobs:
analyze:
runs-on: ubuntu-22.04
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test-website-a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -27,7 +30,7 @@
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1.207.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Website a11y' step
Uses Step
uses 'ruby/setup-ruby' with ref 'v1.207.0', not a pinned commit hash
with:
ruby-version: 3.3

Expand All @@ -37,7 +40,7 @@
npm install -g pa11y-ci

- name: Use 'localhost'
uses: jacobtomlinson/gha-find-replace@v3
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
with:
find: "https://dotnet.stockindicators.dev"
replace: "http://127.0.0.1:4000"
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test-website-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -27,7 +30,7 @@
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1.207.0

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Website URLs' step
Uses Step
uses 'ruby/setup-ruby' with ref 'v1.207.0', not a pinned commit hash
with:
ruby-version: 3.3

Expand All @@ -37,14 +40,14 @@
gem install html-proofer

- name: Replace "data-src"
uses: jacobtomlinson/gha-find-replace@v3
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
with:
find: "data-src"
replace: "src"
regex: false

- name: Use 'localhost'
uses: jacobtomlinson/gha-find-replace@v3
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
with:
find: "https://dotnet.stockindicators.dev"
replace: "http://127.0.0.1:4000"
Expand Down
Loading