Back to list
daothinh

asm-hawk-development

by daothinh

Automated Attack Surface Management platform for reconnaissance and risk validation based on Threat Intelligence

0🍴 0📅 Jan 22, 2026

SKILL.md


name: ASM-Hawk Development description: Build, run, and troubleshoot ASM-Hawk development environment. Use when working with Docker containers, fixing port issues, running migrations, or debugging the application.

ASM-Hawk Development Skill

This skill provides instructions for building, running, and troubleshooting the ASM-Hawk Attack Surface Management application.

Project Overview

ASM-Hawk is a multi-service application using:

  • API: NestJS (TypeScript) on port 3100
  • Web: Next.js (TypeScript) on port 3101
  • Database: PostgreSQL on port 5432
  • Cache: Redis on port 6379
  • Recon Engine: Go on port 8443
  • Tool Containers: subfinder, httpx, nuclei, katana, etc.

Quick Start Commands

Start Development Environment

cd E:\MyProject\asm-hawk
docker-compose up -d

Rebuild After Code Changes

# Rebuild specific service
docker-compose up -d --build api
docker-compose up -d --build web

# Force recreate (for config/env changes)
docker-compose up -d --force-recreate api web

View Logs

docker logs asm-hawk-api --tail 50 -f
docker logs asm-hawk-web --tail 50 -f

Database Operations

# Run migrations
docker exec asm-hawk-api npx prisma migrate deploy

# Seed database
docker exec asm-hawk-api npx prisma db seed

# Reset database (WARNING: deletes data)
docker exec asm-hawk-api npx prisma migrate reset --force

Port Configuration

ServiceHost PortContainer PortURL
API31003100http://localhost:3100/api
Web31013101http://localhost:3101
Recon84438443-
PostgreSQL54325432-
Redis63796379-

Common Issues & Solutions

Issue: "Failed to fetch" on Login/Register

Cause: Frontend can't reach API Fix:

  1. Verify API is running: docker logs asm-hawk-api
  2. Check NEXT_PUBLIC_API_URL=http://localhost:3100 in docker-compose.yml
  3. Ensure API has PORT=3100 environment variable

Issue: "relation does not exist"

Cause: Database not migrated Fix:

docker exec asm-hawk-api npx prisma migrate deploy
docker exec asm-hawk-api npx prisma db seed

Issue: Scan fails with "docker: not found"

Cause: API container missing Docker CLI Fix: Ensure api.Dockerfile has:

RUN apk add --no-cache openssl docker-cli

And docker-compose.yml has:

volumes:
  - /var/run/docker.sock:/var/run/docker.sock

Issue: Code changes not reflected

Cause: TypeScript cache Fix:

# On Windows
Remove-Item -Recurse -Force api/dist
docker restart asm-hawk-api

# Or rebuild completely
docker-compose up -d --build --force-recreate api

Issue: Port mismatch

Cause: Container listens on different port than mapped Fix: Ensure these match:

  • docker-compose.yml: ports: "3100:3100"
  • Dockerfile: EXPOSE 3100
  • main.ts: process.env.PORT || 3100
  • Environment: PORT=3100

Key Files

FilePurpose
docker-compose.ymlService orchestration
docker/api.DockerfileAPI container build
docker/web.DockerfileWeb container build
api/src/main.tsAPI entry point (port config)
api/prisma/schema.prismaDatabase schema
web/src/lib/api.tsFrontend API client

Default Credentials

RoleEmailPassword
Adminadmin@asm-hawk.localpassword123
Analystanalyst@asm-hawk.localpassword123
Viewerviewer@asm-hawk.localpassword123

Prisma Studio (Database GUI)

# Start Prisma Studio in Docker container
docker exec -d asm-hawk-api npx prisma studio --browser none

# Access at: http://localhost:51212

Container Status Check

docker ps --format "table {{.Names}}\t{{.Ports}}\t{{.Status}}" | Select-String "asm-hawk"

Full Rebuild

docker-compose down
docker-compose up -d --build
docker exec asm-hawk-api npx prisma migrate deploy
docker exec asm-hawk-api npx prisma db seed

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon