Engineering portfolio · Wisnu Anggoro · MSIT capstone

One prioritized backlog for cloud waste and security misconfiguration. CloudSpendGuard is a Go command-line tool that brings AWS cost analysis, security checks, and independently verified remediation suggestions into a local developer workflow.

The problem: two backlogs, the same infrastructure

An idle resource can waste money and carry a security misconfiguration at the same time. Separate cost and security reports make engineers reconcile the priorities themselves. This project explores a different workflow: ingest the evidence, detect both kinds of finding, and explain their order in one backlog.

I designed and implemented the ingestion pipeline, rule engines, anomaly detector, joint prioritizer, guarded remediation workflow, reporting, and automated evaluation. The project targets a single AWS account; it is not a replacement for a comprehensive enterprise security platform.

Implementation
Go CLI, static binary
Inputs
CUR, CloudTrail, Terraform
Output
Markdown, HTML, JSON, SARIF

Architecture and design decisions

The layered pipeline separates ingestion, normalization, analysis, ranking, remediation, and presentation. Cost and security analyzers emit a common finding model. Their outputs converge at the joint prioritizer, while an independent verifier checks proposed changes before a diff is shown.

Seven-layer pipeline: CUR, CloudTrail, Terraform and optional live S3 inventory flow through ingestion, a local store, cost and security analysis, joint prioritization, LLM remediation, an independent verifier and reporting.
Architecture reflecting the implemented pure-Go Parquet reader, embedded SQLite store, optional live S3 collector, and bounded verification loop. Open the image for full-size detail.
  • Local-first operation: local-file analysis needs no AWS credentials. Local Ollama inference is the default; live AWS collection and remote inference are separate opt-ins.
  • Transparent ranking: stakeholder profiles weight normalized savings, risk, and a blast-radius penalty. Reports expose score components rather than presenting an unexplained order.
  • Human-controlled changes: remediation produces proposed diffs. The tool never applies infrastructure changes automatically.

Results, with their boundaries

These are recorded project measurements from October 2026, not benchmarks rerun for this portfolio page. The fixtures are small or synthetic, and the results do not establish production-wide accuracy.

Selected project evidence
MeasureRecorded resultScope
Rule library15 cost rules; 20 security rulesSecurity rules carry CIS control mappings.
DetectionPrecision 1.000; recall 0.94132 of 34 labeled defects found; self-authored corpus.
Core statement coverage97.2%Recorded release-candidate measurement; 90% gate.
One million CUR rows2.62 s; about 1,681 MiB peak RSSMacBook Pro M3 Pro, Go 1.27; median of three runs.
Recorded benchmark: 10,000 rows took 0.474 seconds and 44.4 MiB; 100,000 rows took 0.755 seconds and 193.5 MiB; one million rows took 2.616 seconds and 1,680.7 MiB.
Run time supports an interactive workflow, but memory grows with the input. The full 1 GB CUR plus 100 MB CloudTrail target was not demonstrated.

The memory limitation matters. The analysis path retains CUR records in memory. Extrapolating the observed process-memory ratio suggests roughly 13 GiB for approximately eight million rows, before adding a separately running local model. Streaming aggregation is the first improvement planned, not a capability claimed here.

The comparison is deliberately modest. CloudSpendGuard missed two labeled defects. Checkov found all 34 in the pinned comparison run but tied CloudSpendGuard in a separate local run; the cause of that difference is undetermined. The contribution is the combined workflow, not a claim of superior scanner coverage.

Generated remediation is not self-approved

Resource tags and other metadata are untrusted input. The remediation pipeline combines redaction and instruction filtering with a nonce-fenced data prompt. Candidate patches are re-parsed and checked with both analyzers; structural checks and newly introduced findings can reject a patch. Retries are bounded, and a finding can be reported without a patch.

Thirty adversarial fixtures across six categories: 22 payloads withheld by the sanitizer and eight evaluated through the fenced-data and verifier path; five benign controls remain unchanged.
The recorded adversarial suite meets all 30 declared attack outcomes, with five benign controls preserved. These fixture-based checks are not proof that all prompt injection is prevented or that a real model always behaves safely.

Verification is limited by the implemented rules and the available input. It does not replace a human review, a Terraform plan, broader security testing, or an assessment of deployment impact.

Explore the implementation

The public engineering repository is the evidence hub. It contains the prototype, design decisions, evaluation method, test fixtures, and commands for reproducing the checks.

Try the local sample

git clone https://github.com/WisnuAnggoro/cloudspendguard.git
cd cloudspendguard
make build
./bin/csg run --sample --report ./out.html --top 5

The bundled sample workflow needs no AWS credentials. For the recorded fixtures, it produces 23 findings from 392 CUR line items, eight CloudTrail events, and 22 Terraform resources; consult the repository for toolchain prerequisites and current behavior.

The final academic report, presentation slides, and recorded demonstration are not published on this page yet. Private coursework, instructor feedback, and working drafts are intentionally excluded.

Lessons and next steps

Measurement changed the design. Stage timings showed that the initial database round trip, not the assumed Parquet bottleneck, dominated large runs. Comparing results with established scanners exposed a false positive; adversarial fixtures exposed the limits of the instruction filter. The most useful engineering habit was to keep those failures visible and attach regression checks to the fixes.

Next steps are streaming aggregation, broader Terraform expression support, additional read-only live services beyond S3, an independently labeled evaluation corpus, and collection of the planned human usability study. No real survey results are claimed here.

Built by Wisnu Anggoro as a master's capstone exploring cloud cost governance, security engineering, and local-first AI assistance.