Skip to content

Installation Guide

This guide covers all methods to install SecScan on your system.

Prerequisites

  • Go 1.19 or higher (for building from source)
  • Git (for cloning the repository)
  • Linux, macOS, or WSL2 on Windows

Installation Methods

Use the installation script for an interactive setup:

cd secscan
./install.sh

The script will:

  1. Build the binary
  2. Ask you to choose between system-wide or local installation
  3. Set up everything automatically
  4. Verify the installation

Method 2: Make Install (System-wide)

Install globally to /usr/local/bin (requires sudo):

cd secscan
make install

Verify installation:

secscan -version
which secscan

Method 3: Make Install (Local - No sudo)

Install to ~/.local/bin without sudo:

cd secscan
make install-local

If ~/.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 users

Method 4: Go Install

If the repository is public and you have Go installed:

go install github.com/Zayan-Mohamed/secscan@latest

This installs to $GOPATH/bin (usually ~/go/bin).

Ensure $GOPATH/bin is in your PATH:

export PATH="$GOPATH/bin:$PATH"

Method 5: Manual Build

For complete control over the build process:

# Clone the repository
git clone https://github.com/Zayan-Mohamed/secscan.git
cd secscan

# Build the binary
make build

# Binary will be in build/secscan
./build/secscan -version

System-wide Manual Installation

# After building
sudo cp build/secscan /usr/local/bin/
sudo chmod +x /usr/local/bin/secscan

Local Manual Installation

# After building
mkdir -p ~/.local/bin
cp build/secscan ~/.local/bin/
chmod +x ~/.local/bin/secscan

Verify Installation

After installation, verify that SecScan is properly installed:

# Check version
secscan -version

# Check location
which secscan

# Run a test scan
secscan -root /tmp -history=false

Uninstalling

System-wide Installation

sudo rm /usr/local/bin/secscan

Local Installation

rm ~/.local/bin/secscan

Go Install

rm $GOPATH/bin/secscan

Troubleshooting

Permission Denied

If you get "permission denied" when trying to install system-wide:

  • Use make install-local instead
  • Or use sudo make install

Command Not Found

If secscan is not found after installation:

  1. Check if the binary exists:
ls -l ~/.local/bin/secscan
# or
ls -l /usr/local/bin/secscan
  1. Ensure the directory is in your PATH:
echo $PATH
  1. Add to PATH if needed:
    export PATH="$HOME/.local/bin:$PATH"
    

Build Fails

If the build fails:

  1. Check Go version:
    go version
    
  2. Ensure Go 1.19 or higher is installed

  3. Try cleaning and rebuilding:

    make clean
    make build
    

Next Steps