Skip to content

feat: rie private to public automation initial merge#172

Open
tobixlea wants to merge 5 commits intodevelopfrom
rie-private-to-public
Open

feat: rie private to public automation initial merge#172
tobixlea wants to merge 5 commits intodevelopfrom
rie-private-to-public

Conversation

@tobixlea
Copy link

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@tobixlea tobixlea requested a review from a team March 18, 2026 22:08
Comment on lines +10 to +20
runs-on: ubuntu-latest
steps:
- name: Check source branch
run: |
SOURCE_BRANCH="${{ github.head_ref }}"
if [[ "$SOURCE_BRANCH" != "develop" ]]; then
echo "Error: Only pull requests from develop branch are allowed into main"
echo "Current source branch ($SOURCE_BRANCH)."
exit 1
fi
echo "Source branch is develop - merge allowed"

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: {}

Copilot Autofix

AI 1 day ago

In general, fix this by adding a permissions block to the workflow (either at the root or per‑job) and granting the minimal necessary permissions. When a workflow doesn’t need GITHUB_TOKEN at all, you can set permissions: {} or explicitly set all scopes to none. If it only needs to read repository contents, contents: read is sufficient.

For this specific workflow in .github/workflows/validate-branch-into-main.yaml, the job only checks the PR’s source branch and prints messages; it doesn’t use GITHUB_TOKEN to interact with the API or write anything. The safest, least‑privilege change is to add a root‑level permissions block setting contents: read, which is a standard minimal configuration and keeps the workflow compatible with common actions that might be added later which only need read access. Concretely, insert a permissions: section between the name: and on: definitions (around line 2–3). No imports or additional definitions are needed because this is a YAML configuration change only.

Suggested changeset 1
.github/workflows/validate-branch-into-main.yaml

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/validate-branch-into-main.yaml b/.github/workflows/validate-branch-into-main.yaml
--- a/.github/workflows/validate-branch-into-main.yaml
+++ b/.github/workflows/validate-branch-into-main.yaml
@@ -1,5 +1,8 @@
 name: Validate PR Branch into Main 
 
+permissions:
+  contents: read
+
 on:
   pull_request:
     branches:
EOF
@@ -1,5 +1,8 @@
name: Validate PR Branch into Main

permissions:
contents: read

on:
pull_request:
branches:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +1 to +3
name: Validate PR Branch into Main

on:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add this file now? I see another PR open to add this, and some discussion there already: https://github.com/aws/aws-lambda-runtime-interface-emulator/pull/168/changes

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