Skip to content

fix(ci): Fix alpine auto-detection in install-snyk.py#6793

Merged
PeterSchafer merged 1 commit into
mainfrom
fix/CLI-1497_alpine_detection
May 12, 2026
Merged

fix(ci): Fix alpine auto-detection in install-snyk.py#6793
PeterSchafer merged 1 commit into
mainfrom
fix/CLI-1497_alpine_detection

Conversation

@PeterSchafer
Copy link
Copy Markdown
Contributor

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

This PR fixes the alpine auto-detection in install-snyk.py, which would fail in case you install musl tools on a debian.

Where should the reviewer start?

How should this be manually tested?

What's the product update that needs to be communicated to CLI users?

@PeterSchafer PeterSchafer requested review from a team as code owners May 11, 2026 15:22
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented May 11, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

This comment has been minimized.

Base automatically changed from chore/cli-1489_installSnykFilenameParam to main May 11, 2026 15:44
Comment thread scripts/install-snyk.py
@PeterSchafer PeterSchafer force-pushed the fix/CLI-1497_alpine_detection branch from 03ac899 to 1c27f45 Compare May 12, 2026 08:13
@snyk-pr-review-bot
Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Brittle Alpine Detection 🟠 [major]

The implementation of is_alpine() uses a simple substring check "id=alpine" in content. This is fragile because the /etc/os-release specification allows values to be enclosed in double quotes (e.g., ID="alpine"). If quotes are used, the substring match will fail, leading the script to download the glibc-linked snyk-linux binary on an Alpine system. This binary will not execute on Alpine, breaking the installer for those users. Consider using a more robust check that handles optional quotes and ensures it is matching the ID key specifically.

return "id=alpine" in content
📚 Repository Context Analyzed

This review considered 7 relevant code sections from 6 files (average relevance: 0.80)

@robertolopezlopez
Copy link
Copy Markdown

robertolopezlopez commented May 12, 2026 via email

@PeterSchafer PeterSchafer enabled auto-merge May 12, 2026 11:16
@PeterSchafer PeterSchafer merged commit 8c93335 into main May 12, 2026
9 checks passed
@PeterSchafer PeterSchafer deleted the fix/CLI-1497_alpine_detection branch May 12, 2026 11:31
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