What the agent does
This is for a payments API company that keeps two kinds of Postman workspace: public ones, where partners fork the collections that show how to call its API, and team ones, where its engineers keep environments for sandbox and production. Live keys end up in those environments, in saved examples and in request headers, and Postman Enterprise's Secret Scanner finds them. The list it keeps is only useful if someone reads it every week, and this agent does that reading. It signs in to Postman's remote MCP server at https://mcp.postman.com/mcp, the Full tool set, with OAuth, so it acts as the person who connected it. Connect it once with the API key: POST /me/connections {"type": "mcp", "name": "postman", "url": "https://mcp.postman.com/mcp", "auth": {"mode": "oauth"}} answers 202 with an authorize_url, which the key's creator opens while signed in to the Rush console. Postman's EU server takes only a Postman API key, so a team on the EU region would connect https://mcp.eu.postman.com/mcp with "auth": {"mode": "bearer", "token": "…"} instead.
The agent starts with getSecretTypes, the scanner's vocabulary, so it can name each finding's kind. Then it calls detectedSecretsQueries twice with statuses: ["ACTIVE"]: once with workspaceVisibilities: ["public"] and once with ["team"], paging with limit and cursor and asking for include=meta.total so the report can say how many there are. The tool returns values obfuscated and hashed, never in full, so no live key passes through the run. For each secret it calls getDetectedSecretsLocations with the secret's id and its workspaceId, which names the places a person has to go: the collection, environment, globals, folder, request or example that holds it.
Next it reads the team's audit log for the same week. getAuditLogEventActions gives the action names Postman records, and getAuditLogs with since set to last Monday in YYYY-MM-DD and orderBy: "desc" lists who did what. The agent keeps only what helps the reader decide who owns a finding: members added to the team, role changes, and changes to a workspace's visibility. A key found in a workspace that was made public on Tuesday is a different conversation from one that has sat in a team environment for a year.
The prompt forbids every tool that writes. Postman's own description of updateDetectedSecretResolutions says it only records a judgement, never revokes a credential, and that marking a secret REVOKED or ACCEPTED_RISK is a decision a human owner makes. So the agent recommends a resolution for each finding and stops there. The security lead rotates the key with the provider that issued it, then marks it in Postman.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Weekly Postman secret review. Use the Postman connection only to read. 1) Call getSecretTypes. 2) Call detectedSecretsQueries with statuses [\"ACTIVE\"] and workspaceVisibilities [\"public\"], then again with [\"team\"]; page through every result with limit and cursor, include=meta.total. 3) For each secret, call getDetectedSecretsLocations with its secretId and workspaceId. 4) Call getAuditLogEventActions, then getAuditLogs since last Monday (YYYY-MM-DD) for member additions, role changes and workspace visibility changes. Return Markdown: a count line; a Public table first, then Team, each row secret type, obfuscated value as returned, workspace, resource type and name, and a suggested resolution (rotate, false positive, or needs owner); then audit events from this week that relate to those workspaces. Never call updateDetectedSecretResolutions or any create, update, delete, fork, merge or remove tool.",
"connections": [
"postman"
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
The run writes one Markdown report of the active secrets Postman's scanner holds, with every place each one is exposed and a suggested fix. It counts the secrets in public and in team workspaces, then gives a table for each with the secret's type, its obfuscated value as Postman returned it, the workspace, and every resource that holds it. Public findings come first because anyone can fork a public collection. Under the tables, the week's audit events that touch those workspaces: who joined, whose role changed, which workspace changed visibility.
Before acting on it, the security lead opens each public finding in Postman and confirms it is a real credential and not a sample value, then rotates it with the provider that issued it and records the resolution in Postman by hand. A suggested false positive is the agent's reading of the obfuscated value and its location, not a verdict, so it is checked the same way. The transcript at GET /o/{org}/sessions/{id}/messages lists every tool call with its arguments, so it shows that no update tool was called.
Run it on every Monday morning
Save the prompt as an agent with POST /o/{org}/agents, with connections: ["postman"], and in the console give it an automation with a schedule trigger, a cron such as 0 8 * * 1 and the team's timezone, so the report is waiting when the week starts. Automations need Pro or Max. A team that schedules from its own backend instead sends the same request each Monday with a request_id that is a UUID v5 of the week's date, so a retried job starts no second run, and reads the report from the key's webhook.
The same request also works on demand: before a partner launch, or the day a workspace is made public, start one run and read its answer from the session.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
A script that pages through the scanner's findings needs a Postman API key with Enterprise access sitting in a cron job, and then still needs someone to turn a list of secret ids into the places to fix them. On Rush the Postman sign-in stays in Rush's connection, scoped to the person who approved it, and the agent does the lookups a person would do: each secret's locations, then the audit events around it.
Each week's review runs in its own computer and leaves a record. The transcript keeps every query the agent sent and what Postman answered, so when someone asks in March whether a key was flagged in January, the session from that week answers it, with the cost of the run beside it.
Frequently asked questions
Which Postman plan does this need?
Postman's tool descriptions say detectedSecretsQueries, getDetectedSecretsLocations, getSecretTypes and the audit log tools all require a Postman Enterprise plan. On another plan those calls fail and the agent reports that it could not read them.
Does the full secret value ever reach the agent?
No. Postman's description of detectedSecretsQueries says secret values come back obfuscated and hashed, never in full. The report shows the obfuscated value so a person can recognise the key, and the person who rotates it gets the real value from the provider.
Can the agent mark a secret as revoked once we rotate it?
It could call updateDetectedSecretResolutions, but this prompt forbids it, and Postman's own description warns against marking something REVOKED unless the key was actually rotated. Keep that step with the person who did the rotation, in Postman, so the record matches what happened.
Why connect the Full server and not the minimal one?
Postman's README says the remote server's default /minimal path has only essential tools, and /mcp is the Full set with all of them. The scanner and audit log tools are in the Full set, which is the URL Rush lists for Postman.
More Postman jobs
More jobs like this: Produce a report or file, no repo
- Review Yesterday's Failed n8n Workflow Runs Before the Store Opens (n8n)
- Which Feature Flags Changed or Were Left On This Week? A Restaurant-Ordering Software Company's Monday Flag Review on Railway (Railway)
- Which SLOs Burned the Most Error Budget This Week? A Food-Delivery Marketplace's Monday Review in Honeycomb (Honeycomb)
- Audit Row-Level Security in a Supabase Project (Supabase)
- How Do I Run an Async Standup in Slack Without a Standup Bot? A Remote Marketing Agency's Daily Thread and Summary (Slack)