Trigger: A new Docker secret is created via the Portainer API or UI, or a scheduled daily audit runs.
Context/Data Pulled: The AI agent queries Portainer's /api/secrets endpoint to list all secrets, their creation dates, and metadata (e.g., labels like secret.type=database-password). It may also ingest logs from applications using these secrets to detect usage patterns.
Model or Agent Action: An LLM analyzes the secret's name, associated service labels (if any), and any organizational security policies (provided as context) to classify the secret's criticality (e.g., HIGH for database root passwords, MEDIUM for API keys, LOW for internal service tokens). Based on classification and industry benchmarks (e.g., NIST guidelines), the agent generates a recommended rotation policy.
System Update or Next Step: The agent creates a comment on the secret in Portainer (if supported) or posts a structured message to a designated Slack channel or ITSM ticket (e.g., "Secret prod-db-root classified as HIGH. Recommend rotation every 90 days. Next review due: <date>").
Human Review Point: For HIGH criticality secrets or policy deviations, the workflow can pause and require a platform engineer's approval in Portainer or a linked workflow tool before the recommendation is officially logged.