Skip to content
Merged
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
25 changes: 25 additions & 0 deletions .github/workflows/relayer-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
run: |
pushd relayer
nix develop -c go test -v -count=1 -p=1 -tags=integration ./...
build-pkgs:
name: Build and package (Nix and Docker)
runs-on: ubuntu-latest
Expand All @@ -48,3 +49,27 @@

- name: Run build - Docker (via Docker builder)
run: nix develop -c ./scripts/build/make-docker.sh --docker-builder

check-tidy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Install Nix
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # v31
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Ensure modules are tidy
run: |
nix develop -c go run github.com/jmank88/[email protected] tidy
git add --all
git diff --minimal --cached --exit-code
- name: Ensure mockery has been run
run: |
nix develop -c grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm
nix develop -c go run github.com/jmank88/[email protected] -go generate ./...
git add --all
git diff --stat --cached --exit-code
Comment on lines +54 to +75

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 2 months ago

To fix the problem, add a permissions block to the workflow file .github/workflows/relayer-build.yml. The block should be placed at the top level (before jobs:) to apply to all jobs, unless a job requires different permissions. Based on the workflow, none of the jobs appear to require write access to repository contents, so the minimal starting point is contents: read. If in the future a job needs additional permissions (e.g., to create pull requests or write to issues), those can be added at the job level. The change involves inserting the following block after the name: and before the on: section:

permissions:
  contents: read

No additional imports, methods, or definitions are required.

Suggested changeset 1
.github/workflows/relayer-build.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/relayer-build.yml b/.github/workflows/relayer-build.yml
--- a/.github/workflows/relayer-build.yml
+++ b/.github/workflows/relayer-build.yml
@@ -1,5 +1,8 @@
 name: TRON - Relayer
 
+permissions:
+  contents: read
+
 on:
   push:
     branches:
EOF
@@ -1,5 +1,8 @@
name: TRON - Relayer

permissions:
contents: read

on:
push:
branches:
Copilot is powered by AI and may make mistakes. Always verify output.
2 changes: 1 addition & 1 deletion relayer/mocks/CombinedClient.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion relayer/mocks/FullNodeClient.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions relayer/mocks/OCR2Reader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion relayer/mocks/Reader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading