Aqua Security: The Ultimate Cheat Sheet

Introduction: Understanding Aqua Security

Aqua Security is a comprehensive cloud-native security platform that protects applications throughout their lifecycle. It secures containerized, serverless, and virtual machine (VM) workloads across public clouds, private data centers, and hybrid environments. The platform offers protection from development to production with vulnerability scanning, runtime protection, and compliance management.

This cheatsheet provides essential commands, configurations, and best practices for effectively using Aqua Security to secure your cloud-native applications.

Core Components of Aqua Security Platform

ComponentDescriptionPrimary Function
Aqua ConsoleCentral management dashboardConfiguration and monitoring hub
Aqua EnforcerRuntime security agentEnforces policies and monitors containers
Aqua ScannerVulnerability scannerIdentifies vulnerabilities in images and artifacts
Aqua MicroEnforcerLightweight security agentSecures serverless and CaaS environments
Aqua KubeEnforcerKubernetes admission controllerEnforces policies at admission control
Aqua CSPMCloud Security Posture ManagementAssesses cloud infrastructure compliance
Aqua KSPMKubernetes Security Posture ManagementManages K8s security posture
Aqua SaaSCloud-based managementHosted version of Aqua Platform

Installation & Deployment

Platform Deployment Options

# Helm installation for Kubernetes
helm repo add aqua-helm https://helm.aquasec.com
helm repo update
helm install aqua aqua-helm/server --namespace aqua \
  --set imageCredentials.username=<username> \
  --set imageCredentials.password=<password>

# Operator-based installation
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/aqua-operator/master/deploy/crds/operator.aquasec.com_aquacsp_crd.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/aqua-operator/master/deploy/service_account.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/aqua-operator/master/deploy/role.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/aqua-operator/master/deploy/role_binding.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/aqua-operator/master/deploy/operator.yaml

Enforcer Deployment

# Deploy Aqua Enforcer in Kubernetes
helm install aqua-enforcer aqua-helm/enforcer \
  --namespace aqua \
  --set enforcerToken=<token> \
  --set enforcerLogicalName=<cluster_name>

# Deploy Aqua Enforcer in Docker
docker run -d --name aqua-agent \
  --restart unless-stopped \
  --privileged \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /opt/aquasec:/var/lib/aquasec \
  -v /proc:/host/proc:ro \
  -v /sys/fs/cgroup:/host/cgroup:ro \
  -v /var/lib/aquasec/audit:/var/lib/aquasec/audit \
  -e AQUA_SERVER=<aqua_server_address> \
  -e AQUA_TOKEN=<token> \
  registry.aquasec.com/enforcer:latest

Image Scanning & Security

Command Line Scanner (CLI)

# Install Aqua Scanner CLI
curl -s https://get.aquasec.com/aquascanctl | bash

# Scan a local image
aquascanctl scan --host <aqua_server> --user <username> --password <password> <image_name>

# Scan with HTML report
aquascanctl scan --host <aqua_server> --user <username> --password <password> \
  --html --output-path ./reports <image_name>

# Jenkins pipeline integration
aquascanctl scan --host $AQUA_SERVER --user $AQUA_USER --password $AQUA_PASSWORD \
  --registry "Docker Hub" --image-name myapp:latest \
  --register-image --block-failed

# Scan Kubernetes manifests
aquascanctl scan --host $AQUA_SERVER --user $AQUA_USER --password $AQUA_PASSWORD \
  --local-dir ./k8s-manifests --as-k8s

Vulnerability Management

# Sample vulnerability policy (YAML format)
name: Block Critical Vulnerabilities
author: security-admin
scope:
  expression: image.vulnerabilities.critical > 0
actions:
  - block
  - notify:
      - securityTeam@example.com

Image Assurance Policies

Policy TypeUse CaseExample Setting
VulnerabilityBlock critical CVEsBlock if CVSS score > 7.0
MalwarePrevent malwareBlock if malware detected
Sensitive DataPrevent secrets in imagesBlock if AWS keys found
ResourceControl resource usageRequire memory limits
ConfigurationEnforce secure configsRequire non-root user
CIS BenchmarksEnsure complianceBlock if Docker CIS fails
Custom ScriptsCustom security checksRun custom validation scripts

Runtime Protection & Monitoring

Enforcer Configuration

# Sample enforcer configuration in Kubernetes
apiVersion: operator.aquasec.com/v1alpha1
kind: AquaEnforcer
metadata:
  name: aqua-enforcer
  namespace: aqua
spec:
  infra:
    serviceAccount: aqua-sa
  common:
    activeActive: false
    envs:
      - name: AQUA_LOGICAL_NAME
        value: "my-cluster"
  deploy:
    image:
      repository: registry.aquasec.com/enforcer
      tag: "6.5"
    imagePullPolicy: IfNotPresent
  gateway:
    host: aqua-gateway
    port: 3622
  token: "your-enforcer-token"

Runtime Policies

# Sample runtime security policy
name: Block Unauthorized Process Execution
author: security-admin
scope:
  expression: process.name == "bash" && container.privileged == true
actions:
  - block
  - alert:
      severity: critical

Common Runtime Protection Controls

ProtectionPurposeExample Rule
Process ControlWhitelist allowed processesBlock execution of unauthorized binaries
Network ControlLimit network connectionsBlock outbound connections to mining pools
File System ControlProtect sensitive filesBlock writes to /etc/passwd
Drift PreventionPrevent unauthorized changesBlock execution of binaries not in original image
Syscall MonitoringBlock dangerous syscallsBlock container escapes via syscalls
User MonitoringControl user privilegesBlock running as root
Kubernetes ControlsProtect K8s resourcesBlock privilege escalation in pods

Kubernetes Security

KubeEnforcer Deployment

# Deploy KubeEnforcer with Helm
helm install --namespace aqua kube-enforcer aqua-helm/kube-enforcer \
  --set enforcerToken=<token> \
  --set serverHost=aqua-server \
  --set serverPort=443

Kubernetes Admission Control

# Sample Kubernetes admission control policy
name: Block Privileged Containers
author: security-admin
scope:
  expression: kubernetes.resource.kind == "Pod" && kubernetes.container.privileged == true
actions:
  - block
  - alert:
      severity: critical

Kubernetes Posture Management

# Example KSPM configuration
apiVersion: operator.aquasec.com/v1alpha1
kind: AquaKubeEnforcer
metadata:
  name: aqua-kube-enforcer
  namespace: aqua
spec:
  config:
    gateway:
      host: aqua-gateway
      port: 3622
    tokenSecretName: aqua-kube-enforcer-token
  cspcScanner:
    enabled: true
    schedule: "0 * * * *"

Cloud Security Posture Management (CSPM)

Cloud Account Integration

# AWS integration example
name: AWS Production Account
type: aws
credentials:
  type: role
  roleArn: arn:aws:iam::123456789012:role/AquaCSPMRole
  externalId: aqua-cspm-12345
scanRegions:
  - us-east-1
  - us-west-2
scanFrequency: daily

Common CSPM Policies

CloudControl CategoryExample Check
AWSIAMEnsure MFA is enabled for root account
AWSS3Ensure S3 buckets have encryption enabled
AWSNetworkingEnsure security groups don’t allow unrestricted access
AzureStorageEnsure storage accounts restrict network access
AzureIdentityEnsure MFA is enabled for privileged accounts
GCPNetworkingEnsure default firewall rules restrict traffic
GCPIAMEnsure service accounts have minimal privileges

Cloud Native Application Protection Platform (CNAPP)

CNAPP Key Components

ComponentFunctionKey Features
Supply Chain SecuritySecure build pipelineSCA, SBOM, CI/CD scanning
Cloud SecuritySecure cloud infrastructureCSPM, KSPM, drift prevention
Runtime SecurityProtect running workloadsBehavioral monitoring, zero-day detection
Risk PrioritizationFocus on critical issuesRisk-based vulnerability management
ComplianceMeet regulatory requirementsPCI DSS, HIPAA, SOC 2, etc.

Supply Chain Security

# Supply Chain Policy Example
name: Block Images with No SBOM
author: security-admin
scope:
  expression: image.sbom.exists == false
actions:
  - block
  - notify:
      - securityTeam@example.com

Vulnerability Management Best Practices

  1. Risk-Based Prioritization

    • Focus on exploitable vulnerabilities first
    • Consider exposure and asset criticality
    • Prioritize based on EPSS scores and threat intelligence
  2. Automated Remediation Workflows

    • Create tickets automatically for critical findings
    • Set up approval workflows for exceptions
    • Track time-to-remediation metrics
  3. Exception Management

    • Implement formal exception process
    • Require business justification
    • Set expiration dates for all exceptions
  4. Image Assurance

    • Implement policy-as-code for image security
    • Block non-compliant images at build time
    • Enforce image signing and verification
  5. Shift-Left Security

    • Scan during development
    • Integrate with IDEs and CI/CD
    • Provide developer-friendly security feedback

Compliance Management

Supported Compliance Frameworks

FrameworkDescriptionKey Controls
PCI DSSPayment Card Industry Data Security StandardVulnerability management, access control
HIPAAHealth Insurance Portability and Accountability ActPHI protection, access controls
GDPRGeneral Data Protection RegulationData protection, privacy controls
SOC 2Service Organization Control 2Security, availability, processing integrity
NIST 800-53Security Controls for Federal SystemsComprehensive security controls
CIS BenchmarksCenter for Internet SecurityConfiguration best practices

Compliance Automation

# Example compliance automation for PCI DSS
name: PCI DSS Compliance
scans:
  - name: "PCI DSS 6.2 - Vulnerability Management"
    schedule: "0 0 * * *"
    scope:
      - production-environment
    controls:
      - id: pci-dss-6.2
        enabled: true
        severity: critical
  - name: "PCI DSS 2.2 - Configuration Standards"
    schedule: "0 12 * * *"
    scope:
      - payment-processing
    controls:
      - id: pci-dss-2.2
        enabled: true
        severity: high

Risk Management & Reporting

Risk Assessment Matrix

SeverityExposureCVSS ScoreBusiness ImpactPriority
CriticalInternet-facing9.0-10.0HighP0 – Immediate
HighInternal network7.0-8.9MediumP1 – 7 days
MediumLimited access4.0-6.9LowP2 – 30 days
LowIsolated0.1-3.9MinimalP3 – 90 days

Key Metrics & Reports

MetricPurposeTarget
Mean Time to Remediate (MTTR)Measure remediation efficiency< 15 days
Vulnerability DensityMeasure security quality< 5 critical per image
Policy Violation RateMeasure compliance< 5% of deployments
Security DebtTrack unresolved issuesDecreasing month-over-month
Failed BuildsMeasure shift-left effectiveness< 10% of builds

Integration Ecosystem

DevOps Integrations

Tool TypeExamplesIntegration Method
CI/CD ToolsJenkins, GitLab CI, GitHub ActionsPlugin or CLI integration
Container RegistriesDocker Hub, ECR, GCR, ACRRegistry scanner
KubernetesEKS, AKS, GKE, OpenShiftHelm charts, Operators
Infrastructure as CodeTerraform, CloudFormationPolicy validation
Issue TrackingJira, ServiceNowWebhook integration
SIEMSplunk, ELK, Sumo LogicLog forwarding

API Integration Examples

# Get vulnerability scan results via API
curl -X GET "https://<aqua-server>/api/v2/images/<image_id>/vulnerabilities" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

# Create policy via API
curl -X POST "https://<aqua-server>/api/v2/policies" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Block Critical Vulnerabilities",
    "description": "Block images with critical vulnerabilities",
    "author": "admin",
    "type": "registry",
    "scope": {
      "expression": "vulnerability.severity == 'critical'"
    },
    "actions": [
      {
        "name": "block"
      }
    ]
  }'

Troubleshooting & Common Issues

IssueSymptomsResolution
Enforcer ConnectivityEnforcer not appearing in consoleCheck network connectivity, token validity
Scan FailuresImages fail to scanVerify registry credentials, check image format
High CPU UsageEnforcer consuming resourcesAdjust profiling settings, update version
False PositivesToo many alertsTune policies, implement exceptions for known issues
Access DeniedAPI calls failingCheck RBAC settings, verify token permissions
Image BlockingCI/CD pipeline failuresReview policy settings, implement exceptions

Diagnostic Commands

# Check Aqua server status
kubectl get pods -n aqua
kubectl logs -f deployment/aqua-server -n aqua

# Check Enforcer status
kubectl logs -f daemonset/aqua-enforcer -n aqua

# Check KubeEnforcer status
kubectl logs -f deployment/aqua-kube-enforcer -n aqua

# Test connectivity to Aqua server
curl -k https://<aqua-server>:8443/api/v1/ping

# View Aqua component versions
kubectl describe pod -n aqua -l app=aqua-server

Best Practices for Aqua Security

Security Posture Optimization

  1. Implement Defense-in-Depth

    • Scan during build, registry, and runtime
    • Enable drift prevention
    • Implement network segmentation
  2. Follow Least Privilege Principle

    • Block containers running as root
    • Use read-only filesystems where possible
    • Implement pod security standards
  3. Enable Behavioral Protection

    • Use machine learning profiles
    • Enable drift prevention
    • Block suspicious activities
  4. Implement Zero Trust

    • Enable micro-segmentation
    • Enforce mutual TLS
    • Implement pod-to-pod authentication
  5. Automate Security

    • Integrate with CI/CD
    • Implement policy-as-code
    • Automate remediation workflows

Security Program Maturity

Maturity LevelCharacteristicsNext Steps
Level 1: BasicVulnerability scanning, basic policiesImplement CI/CD integration
Level 2: IntermediateCI/CD integration, runtime protectionEnable CSPM, implement compliance
Level 3: AdvancedComplete visibility, automated remediationImplement zero trust, risk-based approach
Level 4: OptimizedRisk-based approach, full automationContinuous improvement, threat hunting

Resources for Further Learning

Glossary of Key Terms

  • CSPM: Cloud Security Posture Management
  • KSPM: Kubernetes Security Posture Management
  • CNAPP: Cloud Native Application Protection Platform
  • SBOM: Software Bill of Materials
  • CVE: Common Vulnerabilities and Exposures
  • CVSS: Common Vulnerability Scoring System
  • CIS: Center for Internet Security
  • Drift Prevention: Blocking runtime changes to containers
  • Admission Control: Security enforcement at K8s admission
  • SCA: Software Composition Analysis
  • RBAC: Role-Based Access Control
  • PCI DSS: Payment Card Industry Data Security Standard
  • SAST: Static Application Security Testing
  • DAST: Dynamic Application Security Testing
  • IAST: Interactive Application Security Testing

This comprehensive cheatsheet provides the key information you need to effectively implement and manage Aqua Security across your cloud-native environment, helping you secure your applications from development to production.

Scroll to Top