Skip to content

build: validate PATH safety in the release build scripts - #78

Merged
sfc-gh-vpalekar merged 1 commit into
snowflakedb:mainfrom
sfc-gh-eukim:release-path-validation
Sep 17, 2026
Merged

sfc-gh-vpalekar merged 1 commit into
snowflakedb:mainfrom
sfc-gh-eukim:release-path-validation

Conversation

@sfc-gh-eukim

@sfc-gh-eukim sfc-gh-eukim commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refine the release build setup further:

  • scripts/release_lib.sh gains assert_secure_path, which refuses to
    build when any PATH directory (or a parent) is writable by other
    users, missing, relative, or empty
  • build.sh and pypi-build.sh run the check first, before any other
    PATH-resolved command, and resolve the repo root with shell builtins
  • for local test builds, SNOWFLAKE_TELEMETRY_ALLOW_UNSAFE_PATH=1
    bypasses the check

Operational note

The release build will stop if a PATH directory is writable by other
users until the agent's toolchain directories are tightened up.

@sfc-gh-eukim
sfc-gh-eukim requested a review from a team as a code owner September 10, 2026 19:57

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@sfc-gh-eukim
sfc-gh-eukim force-pushed the release-path-validation branch from b3f4d93 to 1c2f982 Compare September 14, 2026 22:11
Refine the release build setup further:

- add assert_secure_path to scripts/release_lib.sh, which refuses to
  build if any PATH directory (or its parents) is writable by other
  users, is missing, relative, or empty; the check runs its own
  commands from the base system directories
- build.sh and pypi-build.sh run this check first, before any other
  PATH-resolved command, and resolve the repo root with shell builtins
- SNOWFLAKE_TELEMETRY_ALLOW_UNSAFE_PATH=1 bypasses the check for local
  test builds

Co-authored-by: Cursor <cursoragent@cursor.com>
@sfc-gh-eukim
sfc-gh-eukim force-pushed the release-path-validation branch from 1c2f982 to 238ad1b Compare September 16, 2026 04:03
@sfc-gh-vpalekar
sfc-gh-vpalekar merged commit 17d305c into snowflakedb:main Sep 17, 2026
9 checks passed
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.

3 participants