feat: add bin/ directory with pre-built binaries, update deploy workflow
- Add aasd/bin/ with compiled aasd binary and gotestwaf binary - Fix .gitignore: remove blanket *.exe/*.bin rules - Update install.sh to support local bin/ deployment (dev workflow) - Update README and AGENT.md docs to reference bin/ directory
This commit is contained in:
parent
71b31b7c28
commit
c09d266f02
6 changed files with 39 additions and 22 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -11,10 +11,6 @@ Thumbs.db
|
|||
*.swp
|
||||
*.swo
|
||||
|
||||
# Binaries
|
||||
*.exe
|
||||
*.bin
|
||||
|
||||
# Config — never commit real credentials
|
||||
**/config.yaml
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ gitex2026/
|
|||
- **Wordlist**: `/opt/aasd/subdomains.txt` (5000 names from SecLists)
|
||||
- **Frontend**: `/opt/aasd/static/`
|
||||
- **Service**: `aasd.service` (systemd, runs as `engineer`, WorkingDir `/opt/aasd`)
|
||||
- **Build**: `cd ~/gitex2026/aasd/src && go build -o /opt/aasd/aasd ./cmd/aasd/`
|
||||
- **Build**: `cd ~/gitex2026/aasd/src && go build -o ../bin/aasd ./cmd/aasd/` (outputs to `bin/`)
|
||||
- **Restart**: `sudo systemctl restart aasd`
|
||||
|
||||
## Architecture — Pipeline Flow
|
||||
|
|
@ -111,7 +111,7 @@ executeScanPhase() discoverSubdomains()
|
|||
|
||||
```bash
|
||||
# Build and deploy
|
||||
cd ~/gitex2026/aasd/src && go build -o /opt/aasd/aasd ./cmd/aasd/
|
||||
cd ~/gitex2026/aasd/src && go build -o ../bin/aasd ./cmd/aasd/ && sudo cp ../bin/aasd /opt/aasd/aasd
|
||||
sudo systemctl restart aasd
|
||||
|
||||
# Check service
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ Enter domain → Discover subdomains → Pick target → GoTestWAF scan → AI r
|
|||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Build
|
||||
# Build (from source)
|
||||
cd ~/gitex2026/aasd/src
|
||||
go build -o /opt/aasd/aasd ./cmd/aasd/
|
||||
go build -o ../bin/aasd ./cmd/aasd/
|
||||
|
||||
# Deploy
|
||||
# Quick deploy (pre-built binary in bin/)
|
||||
sudo cp bin/aasd /opt/aasd/aasd
|
||||
sudo systemctl restart aasd
|
||||
|
||||
# Monitor
|
||||
|
|
@ -36,19 +37,28 @@ sudo journalctl -u aasd -f
|
|||
### Structure
|
||||
|
||||
```
|
||||
/opt/aasd/
|
||||
├── aasd # Compiled binary (31M)
|
||||
gitex2026/aasd/
|
||||
├── bin/ # Pre-built binaries
|
||||
│ ├── aasd # Compiled Go binary (31M)
|
||||
│ └── gotestwaf # WAF scanner binary (27M)
|
||||
├── src/ # Go source code
|
||||
├── docs/ # Documentation
|
||||
├── install.sh # Production installer (creates /opt/aasd/)
|
||||
├── sample.config.yaml # Config template (copy to /opt/aasd/config.yaml)
|
||||
├── sample.env # Environment variable template
|
||||
├── README.md # This file
|
||||
└── VERSION
|
||||
|
||||
/opt/aasd/ # Deployed runtime (created by install.sh)
|
||||
├── aasd # Compiled binary (from bin/)
|
||||
├── config.yaml # Server URL, admin credentials, AI key
|
||||
├── prompt.txt # DeepSeek system prompt
|
||||
├── subdomains.txt # 5000 common subdomain names (SecLists)
|
||||
├── gotestwaf # WAF scanner binary (27M)
|
||||
├── subdomains.txt # Subdomain wordlist
|
||||
├── gotestwaf # WAF scanner binary (from bin/)
|
||||
├── gotestwaf-config.yaml # HTTP headers for scans
|
||||
├── testcases/ # GoTestWAF attack payloads
|
||||
├── static/ # Frontend files
|
||||
│ ├── index.html # Landing page
|
||||
│ └── simulation.html # Selection + progress page
|
||||
├── templates/
|
||||
│ └── admin.html # Consultant dashboard
|
||||
├── templates/ # Admin dashboard template
|
||||
├── reports/ # Generated scan reports
|
||||
└── logs/ # Server logs
|
||||
```
|
||||
|
|
@ -148,11 +158,12 @@ src/
|
|||
# Repository
|
||||
cd ~/gitex2026
|
||||
# aasd/src/ — Go source
|
||||
# aasd/bin/ — Pre-built binaries
|
||||
# aasd/docs/ — Documentation
|
||||
|
||||
# Build
|
||||
# Build (outputs to bin/)
|
||||
cd ~/gitex2026/aasd/src
|
||||
go build -o /opt/aasd/aasd ./cmd/aasd/
|
||||
go build -o ../bin/aasd ./cmd/aasd/
|
||||
go vet ./...
|
||||
|
||||
# Update wordlist (optional, defaults to built-in 40 names)
|
||||
|
|
|
|||
BIN
aasd/bin/aasd
Executable file
BIN
aasd/bin/aasd
Executable file
Binary file not shown.
BIN
aasd/bin/gotestwaf
Executable file
BIN
aasd/bin/gotestwaf
Executable file
Binary file not shown.
|
|
@ -93,11 +93,12 @@ else
|
|||
fi
|
||||
|
||||
# ──────────────────────────────────────────────
|
||||
# Determine source of dist/
|
||||
# Determine source of binaries + assets
|
||||
# ──────────────────────────────────────────────
|
||||
RELEASE_URL="${AASD_RELEASE_URL:-}"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
LOCAL_DIST="$SCRIPT_DIR/dist"
|
||||
LOCAL_BIN="$SCRIPT_DIR/bin"
|
||||
|
||||
if [[ -n "$RELEASE_URL" ]]; then
|
||||
# Download from URL
|
||||
|
|
@ -113,13 +114,22 @@ if [[ -n "$RELEASE_URL" ]]; then
|
|||
rm -rf "$TMP_DIR"
|
||||
pass "Release downloaded and extracted"
|
||||
elif [[ -d "$LOCAL_DIST" ]]; then
|
||||
# Copy from local dist/
|
||||
# Copy from local dist/ (full release bundle)
|
||||
info "Copying local dist/ to $APP_HOME ..."
|
||||
mkdir -p "$APP_HOME"
|
||||
cp -r "$LOCAL_DIST"/* "$APP_HOME/"
|
||||
pass "Local dist/ copied"
|
||||
elif [[ -d "$LOCAL_BIN" ]]; then
|
||||
# Copy from local bin/ + source directory (dev workflow)
|
||||
info "Deploying from local bin/ and source files ..."
|
||||
mkdir -p "$APP_HOME"
|
||||
cp "$LOCAL_BIN"/aasd "$LOCAL_BIN"/gotestwaf "$APP_HOME/" 2>/dev/null || true
|
||||
cp "$SCRIPT_DIR/src/gotestwaf-config.yaml" "$APP_HOME/" 2>/dev/null || true
|
||||
cp -r "$SCRIPT_DIR/src/static" "$SCRIPT_DIR/src/templates" "$APP_HOME/" 2>/dev/null || true
|
||||
cp -r "$SCRIPT_DIR/src/gotestwaf/testcases" "$APP_HOME/" 2>/dev/null || true
|
||||
pass "Local binaries and assets deployed"
|
||||
else
|
||||
fail "No release URL set (AASD_RELEASE_URL) and no local dist/ found at $LOCAL_DIST"
|
||||
fail "No release URL set (AASD_RELEASE_URL) and no local dist/ or bin/ found at $SCRIPT_DIR"
|
||||
fi
|
||||
|
||||
# ──────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Reference in a new issue