Skip to content

feat(policy): warn about blocked control-plane ports in offline lint - #6007

Open
shiju-nv wants to merge 3 commits into
ai-openshell:mainfrom
shiju-nv:feat/5993-policy-lint-control-plane-ports/shiju-nv
Open

shiju-nv wants to merge 3 commits into
ai-openshell:mainfrom
shiju-nv:feat/5993-policy-lint-control-plane-ports/shiju-nv

Conversation

@shiju-nv

Copy link
Copy Markdown
Collaborator

Summary

openshell policy lint reports blocked control-plane ports when it can determine the supervisor's destination handling from authored YAML. Each advisory identifies the rule, endpoint, and TCP port. A valid policy still exits successfully.

Related Issue

Closes #5993

Changes

  • Use the supervisor's control-plane port list for both port and ports. Check exact hosts and endpoints with explicit IP constraints.
  • Use the same CIDR parsing and address checks as the supervisor. Leave deployment-specific routing and DNS resolution to runtime.
  • Stream each distinct endpoint and port warning to stderr after validation succeeds. Document this behavior in the policy guide.

Release Notes

Run openshell policy lint before applying a policy to catch blocked control-plane ports, such as TCP 6443 on an exact Kubernetes API hostname. These warnings preserve the success status of a valid policy.

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 26, 2026
@shiju-nv shiju-nv added area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. topic:policy Policy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening. topic:ux CLI commands/flags, help, errors/exit codes, human-readable output, TUI, and first-run experience. labels Nov 26, 2026
Signed-off-by: Shiju <shiju@nvidia.com>

This branch has not been deployed

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

Labels

area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. state:accepted A maintainer decided OpenShell should pursue this issue topic:policy Policy authoring, validation, proving, distribution, enforcement, ergonomics, and hardening. topic:ux CLI commands/flags, help, errors/exit codes, human-readable output, TUI, and first-run experience.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn when policy lint finds a blocked control-plane port

1 participant