Skip to content

feat: add support for supplying policy data from agent config#84

Merged
reecebedding merged 2 commits into
mainfrom
feat/dynamic-policy-data-injection
May 14, 2026
Merged

feat: add support for supplying policy data from agent config#84
reecebedding merged 2 commits into
mainfrom
feat/dynamic-policy-data-injection

Conversation

@reecebedding
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 14, 2026 12:17
@gusfcarvalho gusfcarvalho requested review from Copilot and removed request for Copilot May 14, 2026 12:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • runner/proto/runner.pb.go: Language not supported
Comments suppressed due to low confidence (1)

cmd/agent.go:1517

  • The error from converting policy_data to a protobuf Struct is discarded here as well. Scheduled/single-plugin runs can silently drop invalid policy_data and continue with policies evaluating against missing dynamic data; return or surface the conversion error before calling Configure.
	policyDataStruct, _ := mapToStruct(plugin.PolicyData)
	_, err = runnerInstance.Configure(&proto.ConfigureRequest{
		Config:     plugin.Config,
		PolicyData: policyDataStruct,

Comment thread cmd/agent.go Outdated
if err := func() error {
defer cleanupRunner()

policyDataStruct, _ := mapToStruct(pluginConfig.PolicyData)
Comment thread policy-manager/policy-manager.go
Comment thread cmd/agent.go
Comment thread docs/configuration.md Outdated
can be of any shape and is made available to OPA/Rego policies during evaluation. This allows you to provide runtime
configuration to policies without modifying the policy files themselves.

Usage: ```satisfied if input.value == data.allowed_value```
Comment thread README.md Outdated
policies:
- <policy>
- <policy>
policy_data: # Optional: Mapping for supported policies. Can be any data struct
@reecebedding reecebedding requested a review from Copilot May 14, 2026 13:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • runner/proto/runner.pb.go: Language not supported

Comment thread cmd/agent.go
Comment thread runner/helpers.go
Comment thread README.md
Comment thread docs/configuration.md
@reecebedding reecebedding merged commit 753ca81 into main May 14, 2026
7 checks passed
@reecebedding reecebedding deleted the feat/dynamic-policy-data-injection branch May 14, 2026 13:59
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.

3 participants