Skip to content

Conversation

@devksingh4
Copy link
Member

Also remove old resources from cloudformation

@devksingh4 devksingh4 merged commit 4c28e3e into main Jul 22, 2025
4 of 8 checks passed
@devksingh4 devksingh4 deleted the dsingh14/terraform-alarms branch July 22, 2025 14:40
Comment on lines +9 to +39
runs-on: ubuntu-latest
timeout-minutes: 15
name: Run Unit Tests
steps:
- uses: actions/checkout@v4
env:
HUSKY: "0"

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "yarn"

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.12.2

- name: Restore Yarn Cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-dev
restore-keys: |
yarn-modules-${{ runner.arch }}-${{ runner.os }}-

- name: Run unit testing
run: make test_unit

build:

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 3 months ago

To fix the issue, we will add an explicit permissions block to the test and build jobs. These jobs only require read access to the repository contents, so we will set contents: read as the permission. This ensures that the jobs do not have unnecessary write access, reducing the risk of unintended modifications.


Suggested changeset 1
.github/workflows/manual-prod.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/manual-prod.yml b/.github/workflows/manual-prod.yml
--- a/.github/workflows/manual-prod.yml
+++ b/.github/workflows/manual-prod.yml
@@ -8,2 +8,4 @@
   test:
+    permissions:
+      contents: read
     runs-on: ubuntu-latest
@@ -39,2 +41,4 @@
   build:
+    permissions:
+      contents: read
     runs-on: ubuntu-24.04-arm
EOF
@@ -8,2 +8,4 @@
test:
permissions:
contents: read
runs-on: ubuntu-latest
@@ -39,2 +41,4 @@
build:
permissions:
contents: read
runs-on: ubuntu-24.04-arm
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +40 to +80
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
name: Build Application
steps:
- uses: actions/checkout@v4
env:
HUSKY: "0"

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "yarn"

- name: Restore Yarn Cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-prod
restore-keys: |
yarn-modules-${{ runner.arch }}-${{ runner.os }}-

- name: Run build
run: make build
env:
HUSKY: "0"
VITE_RUN_ENVIRONMENT: prod
RunEnvironment: prod
VITE_BUILD_HASH: ${{ github.sha }}

- name: Upload Build files
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: build-prod
path: |
.aws-sam/
dist/
dist_ui/

deploy-prod:

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 3 months ago

To fix the issue, we will add a permissions block to the build job. This block will explicitly define the minimal permissions required for the job to function correctly. Based on the steps in the build job, it primarily requires read access to the repository contents and the ability to upload artifacts. Therefore, we will set contents: read and actions: write permissions.


Suggested changeset 1
.github/workflows/manual-prod.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/manual-prod.yml b/.github/workflows/manual-prod.yml
--- a/.github/workflows/manual-prod.yml
+++ b/.github/workflows/manual-prod.yml
@@ -42,2 +42,5 @@
     name: Build Application
+    permissions:
+      contents: read
+      actions: write
     steps:
EOF
@@ -42,2 +42,5 @@
name: Build Application
permissions:
contents: read
actions: write
steps:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants