Skip to content

[AAASM-2301] ✨ (scenarios): Add policy-enforcement/go/ implementation#32

Open
Chisanan232 wants to merge 25 commits into
masterfrom
v0.0.1/AAASM-2301/feat/policy_enforcement_go
Open

[AAASM-2301] ✨ (scenarios): Add policy-enforcement/go/ implementation#32
Chisanan232 wants to merge 25 commits into
masterfrom
v0.0.1/AAASM-2301/feat/policy_enforcement_go

Conversation

@Chisanan232
Copy link
Copy Markdown
Contributor

What changed

Adds the Go sub-project for the scenarios/policy-enforcement/ scenario. Reads the shared policy.yaml using gopkg.in/yaml.v3, builds a policyClient implementing assembly.GovernanceClient, and wraps four tools with assembly.WrapTools() — matching the pattern from go/tool-policy.

Files added (scenarios/policy-enforcement/go/):

  • policy.go — loads ../policy.yaml, builds policyClient with per-tool allow/deny rules and fail-closed default
  • tools.go — four tools: read-config, list-agents (ALLOWED), delete-agent, send-email (DENIED)
  • main.go — prints policy summary, runs all 4 wrapped tools, shows ALLOW/DENY with reasons
  • main_test.go — 6 tests: 2 allowed, 2 denied, default-deny, policy config load

Related ticket

Closes AAASM-2301

How to verify

cd scenarios/policy-enforcement/go
go run .          # prints ALLOW/DENY output
go test ./...     # 6 tests pass

Checklist

  • PR title follows [AAASM-XXXX] <GitEmoji> (<scope>): <summary>
  • No secrets, API keys, or .env files committed
  • Example sub-projects include their own README via the scenario-level README
  • SDK/runtime version dependencies are documented or pinned

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant