Scan report
Tght1211 / lan-proxy-gateway
Could an attacker exploit mistakes in this code?
Real issues worth reviewing before you rely on this code.
- High
- 4
- Medium
- 6
- Low
- 0
Sources: Bandit, Semgrep, pip-audit
Does this code look like it is trying to cause harm?
Minor issues. Worth a glance, unlikely to be urgent.
- High
- 3
- Medium
- 2
- Low
- 0
Sources: YARA, ClamAV, GuardDog, dependency checker
- Likely real
- 7
- Uncertain
- 5
- Likely noise
- 3
The risk classifier rates every finding for how likely it is to be a real issue. Likely noise still counts, just much less.
What we found, in plain English
This repository presents a medium-level security risk of 34, which means an attacker could potentially exploit some insecure coding patterns to compromise the system. While the code does not appear to be intentionally malicious based on the low malicious-pattern score, there are several significant vulnerabilities that need immediate attention. The most critical issues involve unsafe command execution where user input is not properly validated before running commands or scripts, which allows attackers to inject harmful code. Additionally, the application lacks proper security settings like HTTPS and public key pinning, leaving it vulnerable to man-in-the-middle attacks. There are also signs of potential supply chain risks, such as mutable tags in GitHub Actions steps that could be hijacked by others. Finally, some files contain dangerous patterns that download and execute remote resources, which is a severe threat if the code is used without strict controls. These findings represent ordinary insecure coding practices rather than malicious intent, but they require careful review and remediation before the repository can be considered safe for production use.
Written by a local language model from the findings below. The risk scores come from the classifier, not from this summary.
Detections by engine
Score over time
Overall score each time this repository was scanned.
Findings
Highest severity first. Select a finding to see the code and what it means.
-
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /cmd/elevate_unix.go line 22
- Likely real
- Yes, 100% confidence
Detected non-static command inside Exec. Audit the input to 'syscall.Exec'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
return syscall.Exec(sudo, args, os.Environ()) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /cmd/update.go line 151
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
if out, err := exec.Command(tmpPath, "--version").Output(); err == nil { -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /internal/app/daemon_process.go line 57
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
cmd := exec.Command(exe, "run") -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /internal/platform/platform.go line 66
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
cmd := exec.Command(name, args...) -
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /README.md
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /README_EN.md
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /install.sh
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_persistence_mechanism — Modifies a startup/scheduling location - legitimate application code essentially never does this
-
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /macos/Info.plist line 3
- Likely real
- Yes, 100% confidence
The application's App Transport Security (ATS) configuration does not leverage the in-built public key pinning mechanisms. The application should consider leverage ATS public key pinning to ensure that the application only communicates to serves with an allow-listed certificate (and public key). By default the device will allow connections if the default trust store (CA store) posesses the right certificates. The number of accepted Certificate Authorities by default is hundreds. Using public key pinning vastly reduces the attack surface.
<plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>zh_CN</string> <key>CFBundleDisplayName</key> <string>LAN Proxy Gateway</string> <key>CFBundleExecutable</key> <string>LANProxyGatewayApp</string> <key>CFBundleIconFile</key> <string>AppIcon</string> <key>CFBundleIdentifier</key> <string>com.tght.lan-proxy-gateway</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>LAN Proxy Gateway</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>0.0.0</string> <key>CFBundleVersion</key> <string>1</string> <key>LSMinimumSystemVersion</key> <string>13.0</string> <key>NSHighResolutionCapable</key> <true/> <key>NSHumanReadableCopyright</key> <string>Copyright 2025-2026 Tght1211</string> <key>NSPrincipalClass</key> <string>NSApplication</string> </dict> </plist> -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /cmd/update.go line 38
- Likely real
- Yes, 98% confidence
Detects URLs to suspicious domains often used for exfiltration or C2 [threat-network-exfiltration]
"https://github.moeyy.xyz/", "https://gh.ddlc.top/", } -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /cmd/update.go line 37
- Likely real
- Yes, 98% confidence
Detects URLs to suspicious domains often used for exfiltration or C2 [threat-network-exfiltration]
"https://mirror.ghproxy.com/", "https://github.moeyy.xyz/", "https://gh.ddlc.top/", } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/release.yml line 15
- Likely real
- Yes, 52% confidence
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
- uses: actions/checkout@v4 -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/release.yml line 19
- Likely real
- Yes, 52% confidence
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
- uses: actions/setup-go@v5 -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/release.yml line 43
- Likely real
- Yes, 52% confidence
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608`.
uses: softprops/action-gh-release@v2 -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /internal/httpproxy/pac.go line 49
- Likely real
- Uncertain, 46% confidence
Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'.
_, _ = w.Write([]byte(script)) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /internal/gateway/natdiag.go line 7
- Likely real
- Uncertain, 38% confidence
Do not use `math/rand`. Use `crypto/rand` instead.
"math/rand/v2"
No findings match these filters.