Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secator-pack-example

Working starter for a third-party secator template pack. Fork this repo, extend the pieces you need, then install it in one shot:

# Try it as-is
secator template add https://github.com/freelabz/secator-pack-example

# Or fork + install your own
secator template add https://github.com/YOU/your-fork

What's inside

File What it registers
src/lib.rsHELLO native task hello (emit an Info per input)
src/lib.rsWebhookDriver driver webhook (per-finding hook + run-end summary)
src/lib.rsUppercaseTxtExporter exporter uppercase_txt (writes report.uppercase.txt)
workflows/recon_lite.yaml workflow recon_lite — chains hello + built-in httpx
scans/recon_lite_scan.yaml scan recon_lite_scan — wraps recon_lite
secator.yml (optional) declares what this pack exposes
Cargo.toml cdylib crate depending on secator-plugin-api

Install / iterate

# One-time install (clones + builds)
secator template add https://github.com/freelabz/secator-pack-example
secator template ls                      # confirm registered

# Verify the pieces landed
secator health | grep hello              # task
secator w recon_lite example.com         # workflow
secator s recon_lite_scan example.com    # scan

# Iterate: push commits → sync
secator template sync                    # skip-if-unchanged (git ref unchanged = no rebuild)

# Uninstall
secator template remove https://github.com/freelabz/secator-pack-example --purge

Use the driver/exporter

Drivers and exporters registered by a pack are just as available as built-ins. Turn them on in ~/.secator/config.yml:

tasks:
  exporters: [json, csv, uppercase_txt]  # add your custom exporter here

drivers:
  defaults: [webhook]                    # add your custom driver here

Local development

While iterating, point the secator-plugin-api dependency at your local checkout rather than the git branch:

# Cargo.toml
[dependencies]
secator-plugin-api = { path = "/path/to/secator/rust/crates/secator-plugin-api" }
async-trait        = "0.1"

Then cargo build --release produces target/release/libmy_pack.so. Drop it directly under ~/.secator/templates/target/release/ (or configure a local custom_templates: entry pointing at a local file:// URL) and reload.

ABI note

Rust has no stable ABI. This plugin MUST be built with the same rustc toolchain + the same secator-plugin-api revision as the host binary you installed. secator template sync shells out to your local cargo, so this Just Works in the common case. The host refuses to load a plugin whose ABI version doesn't match; you'll see a clear [WRN] at startup.

About

Working starter pack for secator custom_templates — task, driver, exporter, workflow, and scan in one repo

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages