SPB Git

Repository Public

security-audit.sh 4.0 KB 81 lines shellscript

1#!/usr/bin/env bash2# =============================================================================3#                  SP BOUCHER | SOFTWARE & RESEARCH4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : QYVORA8# File             : Scripts/security-audit.sh9# Module           : Scripts10# Repository       : https://git.spboucher.ai/qyvora11# Project Website  : Not specified12# Created          : 2026-12-0413# Last Modified    : 2026-12-0414#15# Author           : Simon-Pierre Boucher16# Position         : Professor of Finance17# Institution      : Université du Québec en Outaouais (UQO)18# Organization     : SP Boucher19# Website          : https://spboucher.ai20# Git              : https://git.spboucher.ai21#22# Preferred Contact: contact@spboucher.ai23# Development      : dev@spboucher.ai24# Support          : support@spboucher.ai25# Security/Admin   : admin@spboucher.ai26#27# Copyright (c) 202628# Simon-Pierre Boucher29# All rights reserved where applicable. This file is governed by the30# applicable project license, copyright notices and relevant law.31# Existing third-party rights and notices remain unaffected.32#33# License          : None specified (no license file in this repository)34#35# Do not embed credentials, private keys, access tokens,36# certificates or confidential personal information.37#38# =============================================================================39# END OF SP BOUCHER SOURCE HEADER40# =============================================================================4142# QYVORA — the whole security audit with one command.43#44#   ./scripts/security-audit.sh [--quick|--full] [--no-mobsf] [--nodes "M3U96a M3U96b"] [options]45#46#   --quick          (default) every check with reduced case counts; no application binary, no MobSF,47#                    short fuzzing, timing measured on this machine. For day-to-day work and the pre-push hook.48#   --full           complete audit before a publication: application archive, MobSF, binary checks, sanitizer49#                    builds, complete vector files, long fuzzing and timing campaigns (on --nodes when given).50#   --no-mobsf       skip MobSF (recorded as NOT RUN, never as passed).51#   --with-app       build the application and run the binary checks even in quick mode.52#   --nodes "A B"    MacLustr nodes for the long campaigns (the tree is copied to <node>:qyvora-build/audit*/ only).53#   --timing-node N  node used for the timing measurements (default: first of --nodes in full mode).54#   --only a,b / --skip a,b   restrict the steps (see --list); the others are recorded as NOT RUN.55#   --jobs N         lanes run concurrently (default 3; 1 = sequential).56#   --no-report      write SECURITY_AUDIT_RESULTS.json only.57#58# Results: security/reports/SECURITY_AUDIT_RESULTS.json, SECURITY_AUDIT_REPORT.{md,html,pdf},59# CRYPTOGRAPHIC_VALIDATION_REPORT.pdf. Exit status: 0 when the release gate passes, 1 when it fails,60# 2 on a usage error, 3 when the reports could not be generated.61#62# The repository's script directory is `Scripts/`; `./scripts/security-audit.sh` is the same file on the63# case-insensitive volumes macOS uses by default. On a case-sensitive volume call `Scripts/security-audit.sh`.64# Documentation: security/README.md. This is an internal technical audit, not an independent certification.6566set -euo pipefail67cd "$(dirname "$0")/.."6869PYTHON="${QY_AUDIT_PYTHON:-python3}"70if ! command -v "$PYTHON" >/dev/null 2>&1; then71    echo "security-audit: python3 not found" >&272    exit 273fi74# Tools installed by security/audit/install-tools.sh are optional for the orchestrator itself (standard75# library only): a missing tool is reported as NOT RUN by its runner.76if [ ! -d security/.tools/venv ]; then77    echo "security-audit: security/.tools is missing — run security/audit/install-tools.sh to install the pinned tools" >&278    echo "security-audit: continuing; tools that are not installed will be recorded as NOT RUN" >&279fi80exec "$PYTHON" security/audit/orchestrator.py "$@"81
Files main
Menu

Theme