This guide covers different methods to install SecScan on Linux, macOS, and Windows.
Download and install pre-built binaries directly from GitHub:
curl -fsSL https://raw.githubusercontent.com/Zayan-Mohamed/secscan/main/scripts/install-curl.sh | bashirm https://raw.githubusercontent.com/Zayan-Mohamed/secscan/main/scripts/install-windows.ps1 | iexIf you have cloned the repository and want to build from source:
⚠️ Platform-Specific Notes:
- Linux/macOS: Use
install.shormakecommands- Windows: Use
install.ps1(PowerShell) or the universal Go installer- All Platforms: Use the universal Go installer (
go run installer/install.go)
Recommended Method:
cd secscan
./install.shOr using Make:
cd secscan
make install # System-wide (requires sudo)
# OR
make install-local # User-only (no sudo)Recommended Method:
cd secscan
./install.shOr using Make:
cd secscan
make install # System-wide (requires sudo)
# OR
make install-local # User-only (no sudo)Note: On macOS, you might need to allow the binary in System Preferences → Security & Privacy if prompted.
Method 1: PowerShell Script (Recommended)
Open PowerShell (as Administrator for system-wide install) and run:
cd secscan
.\install.ps1For system-wide installation:
.\install.ps1 -GlobalFor custom installation path:
.\install.ps1 -InstallPath "C:\your\custom\path"Method 2: Manual Build
# Build the binary
go build -o secscan.exe main.go
# Move to a directory in your PATH, for example:
# System-wide: C:\Program Files\secscan\secscan.exe
# User: %USERPROFILE%\.local\bin\secscan.exeNote: Windows doesn't come with make by default. Use PowerShell script or manual build instead.
The universal Go-based installer works on Linux, macOS, and Windows:
cd secscan
go run installer/install.goThis installer will:
- Auto-detect your platform
- Build the appropriate binary
- Offer installation options specific to your OS
- Guide you through PATH configuration
cd secscan
./install.shThe script will:
- Build the binary
- Ask you to choose between system-wide or local installation
- Set up everything automatically
- Verify your PATH configuration
cd secscan
.\install.ps1Options:
- Default: Installs to
%USERPROFILE%\.local\bin -Global: Installs toC:\Program Files\secscan(requires admin)-InstallPath PATH: Custom installation directory
⚠️ Windows Note:makeis not standard on Windows. Useinstall.ps1instead.
System-wide Installation:
Install globally to /usr/local/bin (requires sudo):
cd secscan
make installVerify installation:
secscan -version
which secscanLocal Installation:
Install to ~/.local/bin without sudo:
cd secscan
make install-localIf ~/.local/bin is not in your PATH, add this to your ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"Then reload your shell:
source ~/.bashrc # or ~/.zshrc for zsh usersSystem-wide:
# Build the binary
cd secscan
go build -o build/secscan main.go
# Copy to /usr/local/bin (requires sudo)
sudo cp build/secscan /usr/local/bin/
sudo chmod +x /usr/local/bin/secscanLocal:
# Build the binary
cd secscan
go build -o build/secscan main.go
# Copy to local bin directory
mkdir -p ~/.local/bin
cp build/secscan ~/.local/bin/
chmod +x ~/.local/bin/secscan
# Add to PATH (if not already there)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcUsing Command Prompt or PowerShell:
# Build the binary
cd secscan
go build -o build\secscan.exe main.go
# Copy to a directory in your PATH
# For example, create a local bin directory:
mkdir %USERPROFILE%\.local\bin
copy build\secscan.exe %USERPROFILE%\.local\bin\
# Add to PATH (PowerShell as Administrator):
$oldPath = [Environment]::GetEnvironmentVariable("Path", "User")
$newPath = "$oldPath;$env:USERPROFILE\.local\bin"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
# Restart your terminal to apply changesIf you have Go installed and the repository is public:
go install github.com/Zayan-Mohamed/secscan/v2@latestThis will install to:
- Linux/macOS:
$GOPATH/bin(usually~/go/bin) - Windows:
%GOPATH%\bin(usually%USERPROFILE%\go\bin)
Ensure the Go bin directory is in your PATH:
Linux/macOS:
export PATH="$HOME/go/bin:$PATH"Windows:
$env:Path += ";$env:USERPROFILE\go\bin"export PATH="$HOME/go/bin:$PATH"- Recommended:
./install.shormake install - Paths:
/usr/local/bin(system) or~/.local/bin(user) - Most distributions come with
makepre-installed
- Recommended:
./install.shormake install - Paths:
/usr/local/bin(system) or~/.local/bin(user) - Security Note: On first run, you may see a security prompt:
- Go to System Preferences → Security & Privacy
- Click "Allow Anyway" if prompted
- Run
secscanagain
- Recommended:
.\install.ps1(PowerShell) - Paths:
- User:
%USERPROFILE%\.local\bin(default) - System:
C:\Program Files\secscan(requires admin)
- User:
- Important: Windows doesn't include
makeby default- Use PowerShell script:
.\install.ps1 - Or universal installer:
go run installer/install.go - Or manual build (see Method 3)
- Use PowerShell script:
If using WSL, follow the Linux instructions:
./install.shAfter installation, verify that secscan is working:
# Check version
secscan -version
# Find installation location
which secscan
# Run a quick test
secscan --helpIf you get "command not found", check your PATH:
echo $PATHMake sure the installation directory is included.
If you get "permission denied", make the binary executable:
chmod +x /path/to/secscanIf the binary won't execute, you may need to rebuild for your platform:
cd secscan
make buildcd secscan
make uninstall# System-wide
sudo rm /usr/local/bin/secscan
# Local
rm ~/.local/bin/secscanOnce installed, check out:
- Quick Start Guide - Get started in 2 minutes
- Examples - Real-world usage examples
- README - Full documentation
Run your first scan:
secscan -root /path/to/your/project