Installation

In this section, you will find guidelines to install Horusec-CLI.

There are 4 ways to install Horusec-CLI:

  1. Local Installation
  2. Manual Installation
  3. Installation via Imagem Docker
  4. Installation via Pipeline

See each one of them below:

Requirements

Check out the requirements to use Horusec-CLI:

Local Installation

This installation is recommended if you want to use Horusec for analysis or for searching for vulnerabilities in your project.

See below the commands to install Horusec locally according to your operating system:

MAC or Linux

Run the command below in your terminal:

curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest

Windows

Run the command below in your terminal:

curl -k "https://github.com/ZupIT/horusec/releases/latest/download/horusec_win_amd64.exe" -o "./horusec.exe" && ./horusec.exe version

Manual installation

The manual installation is done according to your operating system and the version you want to download. See the latest versions below:

Horusec has support for:

Operational system Processor Architecture Binary Type Download
Linux amd64 Binary normal 📥 Download
Linux arm64 Binary normal 📥 Download
Linux amd64 Installer debian normal 📥 Download
Linux arm64 Installer debian normal 📥 Download
Linux amd64 Installer rpm normal 📥 Download
Linux arm64 Installer rpm normal 📥 Download
Linux amd64 Binary Stand Alone 📥 Download
Linux arm64 Binary Stand Alone 📥 Download
Mac amd64 Binary normal 📥 Download
Mac arm64 Binary normal 📥 Download
Mac amd64 Binary Stand Alone 📥 Download
Mac arm64 Binary Stand Alone 📥 Download
Windows amd64 Binary normal 📥 Download
Windows arm64 Binary normal 📥 Download
Windows amd64 Binary Stand Alone 📥 Download
Windows arm64 Binary Stand Alone 📥 Download

👉Lastest available version

👉All available versions

Installation via Docker Image

You can carry out your analysis through a docker image, you are able to run locally or using your pipeline.

See some use cases below:

1. Starting image with the run command:

When you initialize the image with the run command, just run Horusec with the command you want.

docker run -v /var/run/docker.sock:/var/run/docker.sock \
        -v $(pwd):/src/horusec \
        horuszup/horusec-cli:latest horusec start -p /src/horusec -P $(pwd) --config-file-path=/src/horusec/horusec-config.json

2. Installation via pipeline

This installation assures the safety in the delivery of your project in production since Horusec is added to your pipeline.

See next the ways to install considering different types of pipeline:

Github Actions

name: SecurityPipeline

on: [push]

jobs:
  horusec-security:
    name: horusec-security
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v2
      with: # Required when commit authors is enabled
        fetch-depth: 0
    - name: Running Horusec Security
      run: |
        curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest
        horusec start -p="./" -e="true"        

AWS Code Build

  • Origin

    • Git Clone Depth: Full
  • Environment:

    • Environment image: Managed image
    • Operational System: Ubuntu
    • Runtime: Standard
    • Image: aws/codebuild/standard:5.0
    • Image version: Always use the most recent image for this version of runtime
    • Environment Type: Linux
    • Enable this indicator if you want to create Docker images or want your builds to get elevated privileges: true
  • Buildspec:

    • Switch to the editor and insert compilation commands:
version: 0.2

phases:
  build:
    commands:
      - docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/src/horusec horuszup/horusec-cli:latest horusec start -p /src/horusec -P $(pwd) --config-file-path=/src/horusec/horusec-config.json

Circle CI

version: 2.1

executors:
  horusec-executor:
    machine:
      image: ubuntu-1604:202004-01

jobs:
  horusec:
    executor: horusec-executor
    steps:
      - checkout
      - run:
          name: Horusec Security Test
          command: |
            curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest
            horusec start -p="./" -e="true"            
workflows:
  pipeline:
    jobs:
      - horusec

Jenkins

stages {
    stage('Security') {
        steps {
            sh 'curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest'
            sh 'horusec start -p="./" -e="true"'
        }
    }
}

Azure DevOps Pipeline

pool:
  vmImage: 'ubuntu-18.04'

steps:
- script: |
    curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest
    horusec start -p ./    

GitLab CI/CD

image: docker:latest

variables:
  GIT_DEPTH: 0 # Required when commit authors is enabled

services:
  - docker:dind

build-code-job:
  stage: build
  script:
    - docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/src/horusec horuszup/horusec-cli:latest horusec start -p /src/horusec -P $(pwd)