nse-test

command
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 8 Imported by: 0

README

NSE Test Executor

This tool verifies the NSE (Nmap Script Engine) initialization, repository management, and script synchronization with ValKey.

Purpose

The NSE Test executor performs the following functions:

  • Verifies proper directory structure for NSE scripts
  • Initializes and tests the ValKey connection
  • Loads the repository list from manifest
  • Ensures NSE script repositories are cloned and up-to-date
  • Synchronizes scripts between the local filesystem and ValKey
  • Validates manifest parsing and script selection

Usage

In Docker Container
# Run the test directly
docker exec -it sirius-engine go run cmd/nse-test/main.go

# Build and run the binary
docker exec -it sirius-engine /bin/bash -c "cd /app-scanner && go build -o bin/nse-test cmd/nse-test/main.go && ./bin/nse-test"
Locally
# Run the test directly
go run cmd/nse-test/main.go

# Build and run the binary
go build -o bin/nse-test cmd/nse-test/main.go
./bin/nse-test

Configuration

The test executor uses these directories:

  • Docker NSE Base: /sirius-nse
  • Repository manifest: /app-scanner/internal/nse/manifest.json

Output

The test provides detailed feedback with emojis for better visibility:

  • 🚀 - Starting test program
  • 🔌 - Connecting to ValKey
  • 🔄 - Processing repositories
  • ✅ - Successful operations
  • ❌ - Failed operations

Troubleshooting

Common issues and solutions:

  1. ValKey Connection Failures:

    • Check if ValKey service is running (docker ps | grep valkey)
    • Verify network connectivity to sirius-valkey:6379
  2. Repository Setup Issues:

    • Ensure git is installed in the container
    • Check network connectivity for git cloning
    • Verify directory permissions in /sirius-nse
  3. Script Sync Failures:

    • Check ValKey connectivity and permissions
    • Ensure proper JSON format in manifest files
    • Verify script file permissions

See Also

  • NSE Scan Test - For testing NSE integration with real Nmap scans

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL