Sign inSign up

dumanoj/laria

By dumanoj

•Updated about 2 months ago

Defense-in-depth security scanner for Java projects integrating 6 industry-standard tools (Trivy, Gi

Image
Security
Integration & delivery
Developer tools
0

10K+

dumanoj/laria repository overview

Laria Logo

ā šŸ›”ļø Laria Security Scanner

Comprehensive security scanning for Java projects with defense-in-depth approach

License: MIT Docker Security

⁠Overview

Laria is a Docker-based security scanner that provides comprehensive security analysis for Java projects and containerized applications. It integrates 10+ industry-standard security tools to detect vulnerabilities across multiple layers:

  • Secrets Detection - Find hardcoded credentials and API keys
  • SAST - Static application security testing
  • Dependency Scanning - Identify vulnerable dependencies
  • IaC Security - Scan infrastructure-as-code files
  • Container Scanning - Analyze Docker images for vulnerabilities
  • Helm Chart Security - Scan Kubernetes Helm charts
  • Dockerfile Linting - Best practices for container images
  • Dependency Consistency - Detect version conflicts and diamond dependencies

⁠Features

āœ… 10+ Security Tools - Gitleaks, Semgrep, SpotBugs, Trivy, Checkov, Hadolint, Grype, Kubescape, Kubeaudit, Helm, Syft
āœ… Multi-Layer Scanning - Secrets, SAST, Dependencies, IaC, Containers, Helm Charts, Linting
āœ… Container Image Scanning - Trivy & Grype for built Docker images
āœ… Helm Chart Security - Kubescape, Kubeaudit, Helm lint, and Trivy for Kubernetes deployments
āœ… Dependency Consistency - Detects diamond dependencies and version conflicts via SBOM analysis
āœ… SBOM Generation - Software Bill of Materials via Syft for supply chain visibility
āœ… Beautiful Reports - HTML, Markdown, and JSON formats with remediation guidance
āœ… Fast Scans - ~2.5 minutes for comprehensive analysis with parallel execution
āœ… CI/CD Ready - GitHub Actions workflow included
āœ… Docker-based - No local tool installation required
āœ… Remote Repository Support - Scan directly from GitHub/GitLab URLs
āœ… Smart Builds - Auto-builds Maven/Gradle projects & Dockerfiles for deeper analysis
āœ… Formatted Output - Clean tables instead of raw JSON
āœ… Configurable Severity - Customizable thresholds and fail-on-severity levels
āœ… Executive Summary - High-level overview for stakeholders

⁠Installation

No installation required! Just pull and run the container:

docker pull dumanoj/laria:latest
docker run --rm -v $(pwd):/repo dumanoj/laria:latest /repo
⁠Option 2: Standalone Installation

Install Laria and all tools directly on your system (Linux/macOS):

curl -sfL https://raw.githubusercontent.com/manojisnow/laria/main/install.sh | bash

This will install everything to ~/.laria (isolated from your system):

  • Tools in ~/.laria/bin
  • Python venv in ~/.laria/venv

Usage: Add the bin directory to your PATH:

export PATH="$HOME/.laria/bin:$PATH"

Then run:

laria /path/to/repo
⁠Uninstallation

To remove Laria cleanly:

curl -sfL https://raw.githubusercontent.com/manojisnow/laria/main/uninstall.sh | bash

This simply removes the ~/.laria directory. No other files are touched.

⁠Quick Start

⁠1. Pull or Build the Docker Image

Option A: Pull from Docker Hub (Recommended)

docker pull dumanoj/laria:latest

Option B: Build from source

git clone https://github.com/manojisnow/laria.git
cd laria
docker build -t laria:latest .
⁠2. Scan a Repository
# Using the scan script (easiest)
./scan-repo.sh /path/to/your/repository

# Or use Docker directly
# If you pulled from Docker Hub, use: dumanoj/laria:latest
# If you built locally, use: laria:latest
docker run --rm \
  --tmpfs /tmp:rw,exec,size=4g \
  -v /path/to/repo:/path/to/repo \
  -v $(pwd)/reports:/laria/reports \
  dumanoj/laria:latest /path/to/repo
⁠3. View Reports
# Open HTML report
open reports/laria_report_*.html

# Or view Markdown report
cat reports/laria_report_*.md

⁠Integrated Tools

ToolPurposeWhat it Finds
GitleaksSecrets DetectionAPI keys, passwords, tokens
SemgrepSASTSQL injection, XSS, code vulnerabilities
SpotBugsSAST (Java)Null pointers, resource leaks, security bugs
TrivyDependencies + IaC + ContainersCVEs, vulnerable packages, misconfigurations
GrypeContainer ScanningContainer image vulnerabilities
CheckovIaC SecurityDockerfile, K8s, Terraform issues
HadolintDockerfile LintingBest practices, security issues
KubescapeKubernetes SecurityK8s misconfigurations, compliance checks
KubeauditKubernetes AuditingSecurity policy violations
HelmHelm Chart LintingChart validation and best practices
SyftSBOM GenerationSoftware Bill of Materials, dependency analysis

⁠Report Formats

Laria generates three report formats:

⁠HTML Report
  • Beautiful formatted tables
  • Color-coded severity levels
  • Clickable CVE links
  • Executive summary
⁠Markdown Report
  • GitHub-compatible
  • Clean tables for all findings
  • Easy to read and share
⁠JSON Report
  • Machine-readable
  • Complete data for CI/CD integration
  • Programmatic analysis

⁠Example Output

šŸ›”ļø Laria Security Scanner Starting...
ā° Scan started at: 2025-12-06 22:36:51

šŸ“¦ Step 1: Repository Management
   Using local repository: /path/to/example-project

šŸ” Step 2: Artifact Detection
   Found artifacts:
   • dockerfiles: 3 item(s)
   • build_files: 4 item(s)
   • jar_files: 2 item(s)

šŸ”Ø Step 3: Building Artifacts
   🐳 Building Docker images...
   ā˜• Building Java projects...

šŸ” Step 4: Source Code Security Scanning
   šŸ”‘ Running secrets detection...
   šŸ› Running static application security testing...
   šŸ“š Running dependency vulnerability scanning...
   ā˜ļø  Running infrastructure-as-code scanning...

šŸ“Š Step 6: Generating Reports
   āœ“ JSON report: reports/laria_report_20251206_223919.json
   āœ“ HTML report: reports/laria_report_20251206_223919.html
   āœ“ Markdown report: reports/laria_report_20251206_223919.md

āœ… Scan completed in 148.12 seconds

⁠CI/CD Integration

⁠GitHub Actions
name: Security Scan

on: [push, pull_request]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Run Laria
        run: |
          docker pull dumanoj/laria:latest
          docker run --rm \
            -v ${{ github.workspace }}:${{ github.workspace }} \
            -v ${{ github.workspace }}/reports:/laria/reports \
            dumanoj/laria:latest ${{ github.workspace }}
      
      - name: Upload Reports
        uses: actions/upload-artifact@v4
        with:
          name: security-reports
          path: reports/

See .github/workflows/laria-scan.yml⁠ for a complete example.

⁠Configuration

Customize scanning behavior with config.yaml:

scanners:
  secrets:
    enabled: true
    tools: [gitleaks]
  
  sast:
    enabled: true
    tools: [semgrep, spotbugs]
  
  dependencies:
    enabled: true
    tools: [trivy]
  
  iac:
    enabled: true
    tools: [trivy, checkov]

severity:
  fail_on: CRITICAL
  report_threshold: LOW

reporting:
  formats: [json, html, markdown]

build:
  enabled: true
  tool: auto  # auto, maven, gradle

⁠Performance

  • Small projects (<100 files): ~30 seconds
  • Medium projects (100-500 files): ~90 seconds
  • Large projects (500+ files): ~150 seconds

Optimization Tips:

  • Use cache volumes for faster subsequent scans
  • Use tmpfs for /tmp directory
  • Scanners run in parallel automatically

⁠Documentation

⁠Requirements

  • Docker 20.10+
  • 4GB RAM minimum
  • 10GB disk space (for Docker image + cache)
  • Internet connection (for CVE database updates)

⁠Project Structure

laria/
ā”œā”€ā”€ laria.py           # Main orchestrator
ā”œā”€ā”€ install.sh            # Standalone installer
ā”œā”€ā”€ Dockerfile            # Production Docker image
ā”œā”€ā”€ config.yaml           # Default configuration
ā”œā”€ā”€ scan-repo.sh          # Convenience script
ā”œā”€ā”€ scanners/             # Scanner implementations
│   ā”œā”€ā”€ secrets_scanner.py
│   ā”œā”€ā”€ sast_scanner.py
│   ā”œā”€ā”€ dependency_scanner.py
│   ā”œā”€ā”€ iac_scanner.py
│   └── lint_scanner.py
ā”œā”€ā”€ utils/                # Utilities
│   ā”œā”€ā”€ repo_manager.py
│   ā”œā”€ā”€ artifact_detector.py
│   ā”œā”€ā”€ report_generator.py
│   └── report_formatter.py
ā”œā”€ā”€ tests/                # Unit and integration tests
└── docs/                 # Documentation

⁠Security & Privacy

Laria is designed to be safe and transparent:

  1. Local Execution: All scanning happens locally within the Docker container. No source code or reports are uploaded to any external server.
  2. Network Usage: The container only connects to the internet to:
    • Download vulnerability database updates (Trivy, Grype).
    • Download project dependencies (Maven, Gradle) during the build phase.
  3. Volume Mounts:
    • Repository: Mounted as Read-Write to allow the build process (e.g., mvn package) to create artifacts in target/.
    • Maven Cache: ~/.m2 is mounted to share your local dependency cache, speeding up builds and using your configured repositories.
  4. Permissions: The container runs as a non-root user (laria) by default to minimize risk.

⁠Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

⁠License

MIT License - see LICENSE⁠ file for details

⁠Acknowledgments

This project integrates the following open-source security tools:

⁠Support

For issues, questions, or contributions, please open an issue on GitHub.


Made with šŸ›”ļø by the Laria team

Tag summary

Content type

Image

Digest

sha256:6df13801d…

Size

738.4 MB

Last updated

about 2 months ago

docker pull dumanoj/laria