Skip to content

Stagging - #232

Open
usmaan08 wants to merge 9 commits into
Snowflake-Labs:mainfrom
usmaan08:Stagging
Open

Stagging#232
usmaan08 wants to merge 9 commits into
Snowflake-Labs:mainfrom
usmaan08:Stagging

Conversation

@usmaan08

Copy link
Copy Markdown

No description provided.

Comment on lines +63 to +64
echo "Using branch: ${GITHUB_REF_NAME}"
snow git execute @advanced_data_engineering_snowflake/branches/${GITHUB_REF_NAME}/module-1/hamburg_weather/pipeline/data/ \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 MEDIUM · GITHUB_REF_NAME interpolated into shell/snow command enabling command injection via branch name · CWE-78

Comment on lines +20 to +24
env:
# Read connection secret
SNOWFLAKE_CONNECTIONS_ADVANCED_DATA_ENGINEERING_SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_CONNECTIONS_ADVANCED_DATA_ENGINEERING_SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
SNOWFLAKE_CONNECTIONS_ADVANCED_DATA_ENGINEERING_SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 MEDIUM · Deployment to production Snowflake triggered by push/PR-merge without environment protection or approval gate · CWE-269

@usmaan08 usmaan08 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

c

Comment on lines +49 to +53
- name: Install SnowflakeCLI
uses: snowflakedb/snowflake-cli-action@v1.5
with:
cli-version: "latest"
default-config-file-path: "config.toml"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 MEDIUM · Workflow pin snowflake-cli-action and CLI to floating 'latest' version enabling supply-chain drift [NEW] · CWE-1104

Comment on lines +4 to +17
pull_request:
types: [closed]
branches:
- staging
- main
push:
branches:
- staging
- main

jobs:
deploy_data_environment:
# Only run when PR is merged or on direct push to environment branches
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 Critical blocker

🔴 HIGH · Deploy workflow triggers on pull_request:closed from any merged PR, enabling untrusted branch code to run with prod secr · CWE-94

How to override this blocker

Resolve the finding and push, or override it:

  1. On this comment: add a 👎 reaction and post an inline reply disputing it.
  2. Add the critical_blocker_force_override label to the PR to trigger re-evaluation.

Every Critical blocker on the PR must be disputed this way — the label on its own does not override a blocker that has no 👎 and reply.

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.

1 participant