Argo CD Application Drift Sentinel
Read-only check an Argo CD application's sync and health status via argocd app get on a schedule and page Slack when it drifts or degrades.
Audits GitHub organization personal access tokens to detect upcoming expirations and prevent CI/CD automation pipeline disruptions.
Enterprise organizations rely on GitHub Personal Access Tokens (PATs) and fine-grained access keys for automation, CI/CD runners, and developer workflows. When tokens expire unexpectedly, production build pipelines fail, deployment gates freeze, and access to internal package registries is revoked. This sentinel scans organization personal access tokens via the GitHub REST API, flags tokens nearing their expiration window, and notifies Security and DevOps teams on Slack to ensure uninterrupted automation.
0 8 * * *) or triggers on-demand via manual execution./orgs/{org}/personal-access-tokens) using organization administrator credentials.expires_at) against current UTC time and flags tokens within expiration_warning_days.io.kestra.plugin.core.flow.If task evaluates whether expiring_tokens_count exceeds max_expiring_token_threshold.SlackIncomingWebhook listing owner usernames, token names, and remaining days.flowchart TD
A[daily_token_audit Schedule Trigger] --> B[scan_github_tokens Python Script]
B --> C[check_expiring_tokens Flowable If]
C -- Expiring Tokens Found --> D[notify_slack_security Webhook]
C -- All Tokens Valid --> E[log_token_audit_status Log]
D --> E
E --> F[export_token_manifest Return]
| Name | Type | Default | Description |
|---|---|---|---|
github_org_name |
STRING |
enterprise-engineering |
Name of the GitHub Enterprise or organization to audit for personal access tokens. |
expiration_warning_days |
INT |
14 |
Number of days before token expiration to flag tokens for proactive renewal. |
alert_on_expiring_tokens |
BOOL |
true |
Whether to dispatch alerts when expiring or expired tokens are detected. |
max_expiring_token_threshold |
INT |
0 |
Maximum allowable count of expiring tokens before triggering an incident notification. |
{{ outputs.scan_github_tokens.vars.total_tokens_audited }}: Total number of organization tokens evaluated.{{ outputs.scan_github_tokens.vars.expiring_tokens_count }}: Number of tokens nearing expiration or already expired.{{ outputs.scan_github_tokens.vars.expiring_tokens_details }}: Serialized JSON list containing token names, owners, and expiration dates.{{ outputs.export_token_manifest.value }}: Structured dictionary containing the complete organization token audit manifest.api.github.com.read:org, admin:org).GITHUB_ADMIN_TOKEN: GitHub personal access token with organization administrator permissions.SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used for dispatching alert messages.GITHUB_ADMIN_TOKEN and SLACK_WEBHOOK_URL in your Kestra Secret storage.company.security namespace.github_org_name to match your GitHub organization.