agent's service account credentials expired mid-audit, scan failed
Prevents mid-audit surprises from expired service account credentials by validating every credential in pre-flight and failing fast with a clear message. Use when scans die on dead service accounts. Not for token refresh flows.
TL;DR
Credential expiry should be a pre-flight check, not a mid-run surprise. Authenticate each service account before starting; if any fail, stop immediately and report which one. Checkpoint anyway so a mid-run expiry still resumes.
agent's service account credentials expired mid-audit, scan failedUse this when
- An audit dies because a service account credential expired.
- Multiple service accounts are in play.
- The failure wastes a long partial run.
Not for this skill when
- The credential is a refreshable token. Use the refresh flow.
- Auth works but calls fail. That is a different problem.
- There is only one credential and it is fresh. Look elsewhere.
Steps
- Pre-flight: authenticate each service account the audit will use. Verify: all succeed.
- If any fail, stop immediately and report exactly which credential failed. Verify: the message names it.
- Only then start the scan. Verify: the scan begins with known-good credentials.
- Checkpoint progress so a mid-run expiry still resumes after rotation. Verify: checkpoints advance.
- Confirm the audit completes. Verify: full coverage.
Variant phrasings
service account expired
The short phrasing.
credentials invalid mid-audit
The state-first search.
pre-flight auth
The solution-first phrasing.
Compatibility: Any service-account credential, any agent runtime.
Why it happens
Failing fast on bad credentials saves the partial-run cleanup. Discovering the expiry mid-run wastes everything done so far.
Edge cases / pitfalls
- Password-expiry policies the agent cannot see; the pre-flight is the only signal.
- The credential working for reads but not writes; pre-flight both if the audit writes.
- Rotation changing the credential mid-run anyway; the checkpoint covers it.
- The failure message needing to name the account, or nobody knows what to rotate.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstoOD-obX_akUTATxp6XuZw