Skip to content

Add GitHub Action: Qwiet preZero Static Analysis#1

Open
brokep wants to merge 9 commits into
developfrom
shiftleft-action-config-1741900950
Open

Add GitHub Action: Qwiet preZero Static Analysis#1
brokep wants to merge 9 commits into
developfrom
shiftleft-action-config-1741900950

Conversation

@brokep

@brokep brokep commented Mar 13, 2025

Copy link
Copy Markdown
Owner

Qwiet LogoQwiet Logo

This pull request adds a GitHub Action workflow file that executes Qwiet preZero's Static Application Security Testing (SAST) on this PR. Once merged, it will also execute SAST on all future PRs opened in this repository.

Visit app.shiftleft.io to see the security findings for this repository.

We've done a few things on your behalf

  • Created a new branch and opened this pull request
  • Generated a unique secret SHIFTLEFT_ACCESS_TOKEN to allow GitHub Actions in this repository to communicate with the Qwiet API
  • Created a GitHub Action that will send this pull request to Qwiet for analysis
  • Added a status check that displays the result of the GitHub Action

Questions? Comments? Want to learn more? Get in touch with us or check out our documentation.

brokep and others added 9 commits January 10, 2024 11:21
mysql is no longer included in the repos
updated readme to include mariadb & mariadb-server to the installation requirements because mysql is not in the repos
Use set -euo pipefail: This will make the script exit immediately if a command fails, a variable is undefined, or a pipeline returns a non-zero status.

Modularize the Script: Break the script into functions for each major task (e.g., install_packages, configure_mysql, setup_firewall). This makes it easier to read and maintain.

Add Logging: Implement logging to capture the script's output and errors, which can be useful for debugging and auditing.

Progress Indicators: Provide feedback to the user about what the script is doing, especially for long-running tasks.
Changes Made

    Added AlmaLinux to install_dependencies:
        Updated the case statement to include almalinux alongside centos|rhel, as it uses yum (or dnf, which is aliased to yum in AlmaLinux).
        Added unbound to the yum install list here to consolidate package installation.
    Added AlmaLinux to configure_mysql and configure_dns:
        Included almalinux in the branches that use chkconfig and service, as AlmaLinux inherits these from RHEL/CentOS 7 compatibility (though it uses systemctl in newer versions; we’ll assume a CentOS 7-like setup for now).
    Simplified configure_dns:
        Removed the redundant unbound installation (now handled in install_dependencies) and kept only the service restart logic.
Key Refactoring Changes

    Command-Line Arguments:
        Added -d (domain), -t (TLS key), and -k (DKIM key) options, making DOMAIN required and TLSKEY/DKIMKEY optional.
    Distribution Detection:
        Detects DISTRO and VERSION from /etc/os-release (EL9) or /etc/system-release (CentOS 6), supporting CentOS 6 and AlmaLinux 9.
    Modular Functions:
        Split into functions: install_dependencies, configure_services, configure_clamav, configure_mysql, configure_dns, configure_system, configure_postfix, and install_magma.
    DNS Handling:
        Added configure_dns to set the hostname, update /etc/hosts, and configure unbound as a local resolver.
        Installs unbound in install_dependencies.
    Service Management:
        Uses systemctl for EL9 (AlmaLinux 9) and chkconfig/service for CentOS 6.
    Dependency Updates:
        Uses dnf and mariadb for EL9, yum and mysql for CentOS 6.
        Added gettext for envsubst (if needed in future config steps).
    Simplified Config:
        Removed extensive /etc/my.cnf and iptables setup for brevity; these can be added back if needed.
        Kept essential Postfix and Magma config.
    Error Handling:
        Added basic exit-on-failure checks with descriptive messages.

Usage
For AlmaLinux 9:
bash

./magmad.install.sh -d us.tem.com

With custom TLS/DKIM keys:
bash

./magmad.install.sh -d us.tem.com -t /root/custom.pem -k /root/dkim.custom.pem
@vercel

vercel Bot commented Mar 13, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
magma ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2025 9:23pm
magma-dsve ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2025 9:23pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants