fix: pin osv-scanner to v2.2.4 (v2.3+ breaks ih-github)#27
Merged
Conversation
osv-scanner v2.3.0+ returns exit code 127 for --help, which breaks infrahouse-toolkit's check_dependencies(). Pin to v2.2.4 until either osv-scanner or infrahouse-toolkit is fixed. See: google/osv-scanner#2835 See: infrahouse/infrahouse-toolkit#246 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
infrahouse8
approved these changes
May 24, 2026
State
|
| Success | Add | 🟡 Change | Destroy |
|---|---|---|---|
| ✅ | 0 | 2 | 0 |
Affected resources by action
| Action | Resources |
|---|---|
| 🟡 | module.aws_service_infrahouse_app.github_repository_file.makefile_fragment[0] |
| 🟡 | module.aws_service_infrahouse_app.github_repository_file.vuln_scanner[0] |
STDOUT
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.aws_service_infrahouse_app.github_repository_file.makefile_fragment[0] will be updated in-place
~ resource "github_repository_file" "makefile_fragment" {
~ commit_message = "Update makefiles/Makefile" -> "Add makefiles/Makefile"
id = "aws-service-infrahouse-app:makefiles/Makefile:main"
# (9 unchanged attributes hidden)
}
# module.aws_service_infrahouse_app.github_repository_file.vuln_scanner[0] will be updated in-place
~ resource "github_repository_file" "vuln_scanner" {
~ content = <<-EOT
# This file is managed by Terraform in github-control repository
# Do not edit this file, all changes will be overwritten
---
name: OSV-Scanner PR Scan
on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
merge_group:
branches: [main]
permissions:
contents: read
pull-requests: write
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
jobs:
vulnerability-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install osv-scanner
run: |
- OSV_VERSION=$(curl -s https://api.github.com/repos/google/osv-scanner/releases/latest | python -c "import sys,json;print(json.load(sys.stdin)['tag_name'].lstrip('v'))")
+ curl -fsSL -o /usr/local/bin/osv-scanner "https://github.com/google/osv-scanner/releases/download/v2.2.4/osv-scanner_linux_amd64"
- curl -fsSL -o /usr/local/bin/osv-scanner "https://github.com/google/osv-scanner/releases/download/v${OSV_VERSION}/osv-scanner_linux_amd64"
+ chmod +x /usr/local/bin/osv-scanner
- chmod +x /usr/local/bin/osv-scanner
+ osv-scanner --version
- name: Detect vulnerabilities
run: |
if [ -n "${{ github.event.pull_request.number }}" ]; then
ih-github scan \
--repo ${{ github.repository }} \
--pull-request ${{ github.event.pull_request.number }}
else
ih-github scan
fi
sast-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install dependencies
run: pip install -r requirements.txt
- name: SAST
run: |
if [ -n "${{ github.event.pull_request.number }}" ]; then
ih-github run \
${{ github.repository }} \
${{ github.event.pull_request.number }} \
semgrep scan --error
else
semgrep scan --error
fi
EOT
id = "aws-service-infrahouse-app:.github/workflows/vuln-scanner-pr.yml:main"
# (9 unchanged attributes hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy.
Warning: Argument is deprecated
with module.ih_8_repos.github_repository.repo,
on modules/local-repo/repos.tf line 4, in resource "github_repository" "repo":
4: has_downloads = false
This attribute is no longer in use, but it hasn't been removed yet. It will
be removed in a future version. See
https://github.com/orgs/community/discussions/102145#discussioncomment-8351756
(and 6 more similar warnings elsewhere)
Warning: Deprecated attribute
on .terraform/modules/actions-runner-pem-493370826424-uw1/data_sources.tf line 11, in data "external" "secret_value":
11: "python", "${path.module}/assets/get_secret.py", data.aws_region.current.name, aws_secretsmanager_secret.secret.id, data.aws_iam_role.caller_role.arn
The attribute "name" is deprecated. Refer to the provider documentation for
details.
(and 5 more similar warnings elsewhere)
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: tf.plan
To perform exactly these actions, run the following command to apply:
terraform apply "tf.plan"
metadata
eyJzMzovL2luZnJhaG91c2UtZ2l0aHViLWNvbnRyb2wtc3RhdGUvdGVycmFmb3JtLnRmc3RhdGUiOiB7InN1Y2Nlc3MiOiB0cnVlLCAiYWRkIjogMCwgImNoYW5nZSI6IDIsICJkZXN0cm95IjogMH19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--help, which breaksinfrahouse-toolkit'scheck_dependencies()osv-scanner --versionverification step--helpshould exit 0 per GNU standard)--help)Closes #22
Test plan
🤖 Generated with Claude Code