Skip to content

ANSSI SILENE Executor

Category: Vulnerability Scanners Script: anssi_silene.py Integration: CLI Faraday Plugin: Raw JSON Website: ANSSI-FR/SILENE

Description

Runs the ANSSI SILENE audit tool against a Linux host and imports the failed hardening recommendations into Faraday. SILENE checks the host against the ANSSI BP-028 Linux hardening guidelines, and each non-compliant recommendation becomes a vulnerability.

Prerequisites

  • silene installed and available in the agent's PATH (checked with silene --help), or its location set in SILENE_BIN
  • SSH access from the agent to the target host
  • An SSH private key readable by the agent, if the host requires key authentication

Configuration

Environment Variables (Setup)

Variable Required Description
SILENE_SSH_USER No SSH user that SILENE uses to connect to the target host. Must be set together with SILENE_SSH_KEY.
SILENE_SSH_KEY No Absolute path to the SSH private key file, as seen by the agent (e.g., /keys/silene_id_rsa). Must be set together with SILENE_SSH_USER.
SILENE_BIN No Path or name of the SILENE binary (default: silene)

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
SILENE_TARGET_HOST string Yes FQDN or IP of the Linux host to audit (e.g., host01.example.local). It must be reachable over SSH from the agent.
SILENE_PROFILE string No ANSSI BP-028 hardening profile to evaluate: anssi-bp-028-minimal, intermediate, enhanced or high (default: SILENE's own default)

YAML Configuration Example

executors:
  anssi_silene:
    repo_executor: anssi_silene.py
    max_size: 65536
    varenvs:
      SILENE_SSH_USER: "audit"
      SILENE_SSH_KEY: "/keys/silene_id_rsa"
    params:
      SILENE_TARGET_HOST:
        mandatory: true
        type: string
        base: string
      SILENE_PROFILE:
        mandatory: false
        type: string
        base: string

How It Works

  1. Validates the configuration: the profile must be one of the allowed values, and the SSH user and key must be set together
  2. Runs silene --target <SILENE_TARGET_HOST> --format json into a temporary directory, adding --profile, --ssh-user and --ssh-key when configured
  3. Reads the JSON reports SILENE writes and keeps every recommendation that is non-compliant or errored. Compliant and skipped ones are dropped.
  4. Creates one Faraday vulnerability per failed recommendation, with severity based on the BP-028 level:
    • minimal becomes critical
    • intermediate becomes high
    • enhanced becomes medium
    • high becomes low
    • Errored recommendations are info. If SILENE reports no level, the severity is guessed from keywords in the rule title.

Notes

  • All findings go on a single host. Its IP and hostname are the value of SILENE_TARGET_HOST, and its OS is set to Linux.
  • Vulnerabilities are always created as open. Each one links to the ANSSI Linux hardening guide and the SILENE repository.
  • The SSH key file must exist on the agent. For Docker deployments, mount it into the container.
  • If SILENE exits with an error, the failure is logged but the executor still imports whatever reports were produced.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.