aws-samples / aws-samples/sample-security-review-tool

Running SRT on windows

Open
#36 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

On Windows, the command "srt config" ran into issues of profile not found even though aws config was good. Also, some prerequisites are needed. Please see details below:

Issue 1: srt config — "No AWS profiles found!"
===============================
The srt config command couldn't discover AWS profiles despite ~/.aws/credentials and ~/.aws/config being properly formatted and aws sts get-caller-identity working fine.

Root cause: A bug in the SRT Windows binary (Node.js SEA). The bundled runtime's os.homedir() or file system access doesn't resolve ~/.aws/ correctly on Windows. The source code's parsing logic works perfectly when tested with standalone Node.js — the issue is specific to the compiled binary.

Fix (workaround): Manually created the SRT config file that srt config would have generated:

C:\Users\xxxxxxxxxxxxx\srt\srtconfig.json
{
"AWS_PROFILE": "default",
"AWS_REGION": "us-east-1",
"TELEMETRY_ENABLED": false,
"INSTALLATION_ID": ""
}

Issue 2: "Prerequisites not installed"
=========================
SRT requires Checkov, Semgrep, Bandit, Syft, and Jupyter installed in a .venv directory next to the binary. The srt config command normally installs these, but since it was blocked by Issue 1, they were missing.

Fix: Manually created the venv and installed the tools:

python -m venv \.venv
\Scripts\python.exe -m pip install checkov semgrep bandit anchore_syft jupyter
Also had to upgrade pip (old pip 21.2.3 wasn't creating entry-point scripts) and create a checkov wrapper script since that package doesn't define a console_scripts entry point.

After all three fixes, srt assess runs successfully against a local project.

Contributor guide

Open the contributing guide

Research direction

Start at the `srt config` command and the Windows Node.js SEA packaging entry point; reproduce profile discovery with valid AWS credentials and inspect how the binary resolves the home directory. Check the virtual-environment setup and prerequisite installation path as well. Done means the Windows binary discovers AWS profiles and installs or exposes the required tools so `srt assess` runs without manual workarounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, python, typescript
Domain
cli, devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.