[Security]: Add comprehensive security scanning to Nuitka build jobs #76

Open
opened 2026-06-13 15:39:38 +00:00 by ValleyGeek · 4 comments
Owner

Summary

Add automated security scanning steps to Nuitka standalone build pipeline for both the Windows executable (.exe / .dist folder) and the Linux AppImage.

Provide users with safety assurance, catch real issues early, document scan results, and reduce AV false-positive complaints.

Impact

Nuitka binaries are frequently flagged by Windows Defender and other AVs due to their compiled structure. These scans will give us (and users) confidence and help with false-positive submissions.

Steps to reproduce

No response

Suggested mitigation

After the Nuitka compilation step (and before artifact upload), add the following checks:

  1. ClamAV scan (fast, local, cross-platform)

    • Run on the built .exe / .dist and .AppImage
    • Fail the build on any positive detection
  2. VirusTotal scan (comprehensive – 70+ engines)

    • Use crazy-max/ghaction-virustotal (or vt-cli on Forgejo runners)
    • Upload scan report as build artifact
    • Post a shareable report link in job summary / release notes
  3. Static analysis

    • Windows: PEStudio / Detect-It-Easy / Capa (capabilities scan)
    • Linux: checksec, readelf, objdump, entropy checks on main binary
  4. Nice-to-have / follow-ups

    • Code signing (Windows Authenticode + Linux GPG)
    • Automatic upload of scan reports to release assets
    • README section documenting latest scan results + SHA256 hashes

Acceptance criteria

  • ClamAV scan passes on clean builds
  • VirusTotal report is generated and linked in CI logs
  • Scans run on both Windows and Linux build jobs
  • Scan results are preserved as build artifacts
  • Documentation updated in README (scan summary + how users can verify)
### Summary Add automated security scanning steps to Nuitka standalone build pipeline for both the Windows executable (.exe / .dist folder) and the Linux AppImage. Provide users with safety assurance, catch real issues early, document scan results, and reduce AV false-positive complaints. ### Impact Nuitka binaries are frequently flagged by Windows Defender and other AVs due to their compiled structure. These scans will give us (and users) confidence and help with false-positive submissions. ### Steps to reproduce _No response_ ### Suggested mitigation After the Nuitka compilation step (and before artifact upload), add the following checks: 1. ClamAV scan (fast, local, cross-platform) - Run on the built .exe / .dist and .AppImage - Fail the build on any positive detection 2. VirusTotal scan (comprehensive – 70+ engines) - Use crazy-max/ghaction-virustotal (or vt-cli on Forgejo runners) - Upload scan report as build artifact - Post a shareable report link in job summary / release notes 3. Static analysis - Windows: PEStudio / Detect-It-Easy / Capa (capabilities scan) - Linux: checksec, readelf, objdump, entropy checks on main binary 4. Nice-to-have / follow-ups - Code signing (Windows Authenticode + Linux GPG) - Automatic upload of scan reports to release assets - README section documenting latest scan results + SHA256 hashes ### Acceptance criteria - ClamAV scan passes on clean builds - VirusTotal report is generated and linked in CI logs - Scans run on both Windows and Linux build jobs - Scan results are preserved as build artifacts - Documentation updated in README (scan summary + how users can verify)
Member

Implemented on branch 0.1.42/issue-76-build-security-scanning (queued for PR to main, not yet opened).

Both release jobs (linux-appimage.yml, windows-release.yml) now scan the freshly built artifact after the Nuitka build and before publishing it as a Forgejo release asset:

  • ClamAV scans the AppImage/exe; a detection fails the build (scripts/security-scan-artifact.py).
  • Static analysis (informational, never fails the build): checksec/readelf/file on Linux; an Authenticode signature check + PE section/entropy dump (via pefile) on Windows.
  • VirusTotal upload (scripts/virustotal-scan.py) is optional infrastructure — it skips quietly when no VT_API_KEY secret is configured, and never fails the build on a network error or a detection, only links the multi-engine report.

Each step's summary (including the artifact's SHA256) is written to the job's GITHUB_STEP_SUMMARY. Documented in README under a new "Security scanning" section, with unit tests covering both scripts' logic (ClamAV missing/clean/detected/error, summary formatting, VT upload/poll/skip-on-no-key/network-failure-is-non-fatal).

A couple of notes for whoever has admin access to the Forgejo instance:

  • To enable the VirusTotal step, add a VT_API_KEY secret (otherwise it just skips with a log line — nothing breaks).
  • I couldn't verify the choco install clamav step actually succeeds on the real windows-full runner image from here (no Windows CI access in this environment) — worth watching the first run of this workflow to confirm, since a failed ClamAV install will fail the whole release build by design (per the issue's "fail the build on any positive detection" — a missing scanner shouldn't let an artifact ship unscanned either).

This is CI/workflow-only — no src//resources/ changes, so no app version bump. Closing — implemented and tested at the script-logic level; first real CI run will confirm the runner-environment integration.

Implemented on branch `0.1.42/issue-76-build-security-scanning` (queued for PR to `main`, not yet opened). Both release jobs (`linux-appimage.yml`, `windows-release.yml`) now scan the freshly built artifact after the Nuitka build and before publishing it as a Forgejo release asset: - **ClamAV** scans the AppImage/exe; a detection fails the build (`scripts/security-scan-artifact.py`). - **Static analysis** (informational, never fails the build): `checksec`/`readelf`/`file` on Linux; an Authenticode signature check + PE section/entropy dump (via `pefile`) on Windows. - **VirusTotal** upload (`scripts/virustotal-scan.py`) is optional infrastructure — it skips quietly when no `VT_API_KEY` secret is configured, and never fails the build on a network error or a detection, only links the multi-engine report. Each step's summary (including the artifact's SHA256) is written to the job's `GITHUB_STEP_SUMMARY`. Documented in README under a new "Security scanning" section, with unit tests covering both scripts' logic (ClamAV missing/clean/detected/error, summary formatting, VT upload/poll/skip-on-no-key/network-failure-is-non-fatal). A couple of notes for whoever has admin access to the Forgejo instance: - To enable the VirusTotal step, add a `VT_API_KEY` secret (otherwise it just skips with a log line — nothing breaks). - I couldn't verify the `choco install clamav` step actually succeeds on the real `windows-full` runner image from here (no Windows CI access in this environment) — worth watching the first run of this workflow to confirm, since a failed ClamAV install will fail the whole release build by design (per the issue's "fail the build on any positive detection" — a missing scanner shouldn't let an artifact ship unscanned either). This is CI/workflow-only — no `src/`/`resources/` changes, so no app version bump. Closing — implemented and tested at the script-logic level; first real CI run will confirm the runner-environment integration.
Author
Owner

Reopened as a reminder to the admin to have the compiled application reviewed for personal data then add a VirusTotal VT_API_KEY secret. https://www.virustotal.com/gui/home/upload

Reopened as a reminder to the admin to have the compiled application reviewed for personal data then add a VirusTotal VT_API_KEY secret. https://www.virustotal.com/gui/home/upload
Member

Acknowledged — this reopen is a reminder for whoever has Forgejo admin access, not a code task, so I'm not changing anything here. For the record: to enable the VirusTotal step, add a VT_API_KEY repo/org secret (the workflow already skips it quietly when absent). The "review the compiled application for personal data before uploading" step is a manual call for a human to make before that secret is added — leaving this open until an admin has done both.

Acknowledged — this reopen is a reminder for whoever has Forgejo admin access, not a code task, so I'm not changing anything here. For the record: to enable the VirusTotal step, add a `VT_API_KEY` repo/org secret (the workflow already skips it quietly when absent). The "review the compiled application for personal data before uploading" step is a manual call for a human to make before that secret is added — leaving this open until an admin has done both.
Member

Closing — shipped in PR #123 (part of the stacked 11-PR chain bringing the full feature backlog into main). ClamAV scan (build-failing), informational static analysis (checksec/readelf/file on Linux, Authenticode + PE section/entropy dump on Windows), and optional VirusTotal upload are now wired into both release jobs after the Nuitka build, before artifact publish. Documented in README under "Security scanning".

Closing — shipped in PR #123 (part of the stacked 11-PR chain bringing the full feature backlog into `main`). ClamAV scan (build-failing), informational static analysis (checksec/readelf/file on Linux, Authenticode + PE section/entropy dump on Windows), and optional VirusTotal upload are now wired into both release jobs after the Nuitka build, before artifact publish. Documented in README under "Security scanning".
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ai-collab/bulk-image-organizer#76
No description provided.