Skip to content
Clairos Learn

CLI and workspace hygiene · Lesson 7 of 12 · 6 min

Search without exposing secrets

Searching logs should minimize unnecessary disclosure. Select the needed fields and redact credentials before sharing an evidence bundle.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated AI Ops lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

Searching logs should minimize unnecessary disclosure. Select the needed fields and redact credentials before sharing an evidence bundle.

Interpret the evidence

Remove the authorization value while retaining request_id and status for diagnosis.

A tempting mistake

Share the entire matching record because grep found it.

All names, measurements, prices, versions, and thresholds in this exercise are fictional training data. The evidence supports this bounded scenario, not a claim about a live provider.

Worked example and expected result
$ cat /opt/ai-lab/cases/aiops-cli-workspace-007.json
{
  "fixture": "Fictional training data; not a live measurement.",
  "matched_fields": [
    "request_id",
    "status",
    "authorization"
  ],
  "sensitive_field": "authorization"
}

Exit status: 0. The command completed successfully in the training fixture.

$ jq .sensitive_field /opt/ai-lab/cases/aiops-cli-workspace-007.json
"authorization"

Exit status: 0. The command completed successfully in the training fixture.

$ printf '%s\n' 'redact-authorization' > /home/learner/lab/aiops-cli-workspace-007-decision.txt
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Name the assumption that would have to change for “redact-authorization” to stop being the justified action. Do not silently replace missing evidence with a guess.

Explain it

What does the evidence in “Search without exposing secrets” justify?

Apply it elsewhere

A colleague concludes: “Share the entire matching record because grep found it.” What should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Capture bounded command outputTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Compare a configuration copyCompare the intended configuration with the candidate before activation. A one-line change can still alter behavior substantially, so read the value and its context.Practice
  2. 02Capture bounded command outputBound captured output by relevant scope, not by silently discarding inconvenient evidence. A short recent log window is useful when its limits are recorded in the note.Practice
  3. 03Build an evidence directoryAn evidence directory should group related observations and leave source artifacts unchanged. A directory name can carry a case ID while each file names one type of evidence.Practice