Files
git.stella-ops.org/src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.Lang.Go/AGENTS.md
master 90c244948a Update AGENTS.md files across multiple modules to standardize task status update instructions and introduce a new document for Secret Leak Detection operations.
- Modified task status update instructions in AGENTS.md files to refer to corresponding sprint files as `/docs/implplan/SPRINT_*.md` instead of `docs/implplan/SPRINTS.md`.
- Added a comprehensive document for Secret Leak Detection operations detailing scope, prerequisites, rule bundle lifecycle, enabling the analyzer, policy patterns, observability, troubleshooting, and references.
2025-11-05 11:58:32 +02:00

2.5 KiB
Raw Blame History

StellaOps.Scanner.Analyzers.Lang.Go — Agent Charter

Role

Build the Go analyzer plug-in that reads Go build info, module metadata, and DWARF notes to attribute binaries with rich provenance inside Scanner.

Scope

  • Inspect binaries for build info (.note.go.buildid, Go build info blob) and extract module, version, VCS metadata.
  • Parse DWARF-lite sections for commit hash / dirty flag and map to components.
  • Manage shared hash cache to dedupe identical binaries across layers.
  • Provide benchmarks and determinism fixtures; package plug-in manifest.

Out of Scope

  • Native library link analysis (belongs to native analyzer).
  • VCS remote fetching or symbol download.
  • Policy decisions or vulnerability joins.

Expectations

  • Latency targets: ≤400µs (hot) / ≤2ms (cold) per binary; minimal allocations via buffer pooling.
  • Shared buffer pooling via ArrayPool<byte> for build-info/DWARF reads; safe for concurrent scans.
  • Deterministic fallback to bin:{sha256} when metadata absent; heuristics clearly identified.
  • Offline-first: rely solely on embedded metadata.
  • Telemetry for binaries processed, metadata coverage, heuristics usage.
  • Heuristic fallback metrics: scanner_analyzer_golang_heuristic_total{indicator,version_hint} increments whenever stripped binaries are classified via fallbacks.

Dependencies

  • Shared language analyzer core; Worker dispatcher; caching infrastructure (layer cache + file CAS).

Testing & Artifacts

  • Golden fixtures for modules with/without VCS info, stripped binaries, cross-compiled variants.
  • Benchmark comparison with competitor scanners to demonstrate speed/fidelity advantages (captured in src/Bench/StellaOps.Bench/Scanner.Analyzers/lang/go/).
  • ADR documenting heuristics and risk mitigation.

Required Reading

  • docs/modules/scanner/architecture.md
  • docs/modules/platform/architecture-overview.md

Working Agreement

    1. Update task status to DOING/DONE in both correspoding sprint file /docs/implplan/SPRINT_*.md and the local TASKS.md when you start or finish work.
    1. Review this charter and the Required Reading documents before coding; confirm prerequisites are met.
    1. Keep changes deterministic (stable ordering, timestamps, hashes) and align with offline/air-gap expectations.
    1. Coordinate doc updates, tests, and cross-guild communication whenever contracts or workflows change.
    1. Revert to TODO if you pause the task without shipping changes; leave notes in commit/PR descriptions for context.