Automate the repetitive, rule-bound work first
The chapter opens with Lucy on Meridian's service desk counting how often she offboarded a leaver by hand in one quarter: thirty-one times, about twenty minutes each, with a different small mistake waiting each time. The author's argument is that automation and AI multiply whatever they are pointed at, good process or bad, and that they only multiply a foundation that is already sound. Automating on top of an estate you do not understand, identities you do not control or secrets you cannot manage industrialises the problem.
Good first candidates are repetitive, rule-bound and costly when done wrong, and their result is easy to verify. Joiner-mover-leaver processing, patch-compliance reporting, log triage, certificate-expiry monitoring and incident evidence collection fit. Decisions that depend on context, such as whether an alert is a real incident or how to word a breach notification, do not. A simple ranking is frequency multiplied by pain, which tends to favour the boring task over the interesting one.
Two safe starting points: offboarding and read-only reporting
The book's offboarding sketch blocks sign-in and revokes sessions, converts the mailbox to shared or delegates it to the manager, records group memberships before removing them, reclaims licences only after the mailbox is preserved, and flags the device in MDM. It refuses protected break-glass accounts, logs every step to a ticket, and never hard-deletes; the final deletion is left to a person after the retention window. The trigger matters as much as the script: it should run from an authorised HR leaver record, not a chat message, so the decision always has an owner in a system of record and the routine cannot be misused to disable someone on request.
A scheduled, read-only patch-compliance report is the second easy win, because it changes nothing and so cannot break anything. It also lets a team practise the surrounding plumbing, such as a service identity, a vaulted credential, scheduling, delivery and failure alerts, before automating actions. The author warns that a report nobody reads gives a false sense of oversight, so each report needs an owner who acts on it.
Orchestration at small-business scale
SOAR platforms exist for large organisations, but the principle is a pipeline: a trigger, automatic enrichment, an optional suggested action, and a human gate before anything consequential. Enrichment is the safest and most valuable part; when a compromised-account alert fires, a script can pull sign-in history, group memberships, inbox rules and OAuth grants into the ticket so the responder starts fully briefed. The book recommends building this from a scheduler, scripts in version control, the ticketing system's API and a chat webhook, which the team can understand completely.
For experienced readers, the chapter warns against automating consequential responses on top of noisy detections, since an auto-disable tied to a weak impossible-travel rule will eventually lock out legitimate users. It suggests confidence tiers: high-confidence, low-impact actions such as quarantining an email already confirmed malicious can run automatically, while consequential actions are staged for one-click human approval. It also recommends a single kill switch to halt all automation and logging every automated action to the immutable store.
Treat automation as privileged access
A script that can disable any account or read the whole estate is among the most privileged things in the environment, and compromising it gives an attacker that reach at once. The book's guardrail pattern is a dedicated least-privilege identity, preferably a workload identity with short-lived credentials rather than a stored key or a person's admin account; secrets fetched from a vault at runtime; code in version control with branch protection and review; immutable logging of actor, action, target, result and ticket reference; a required ticket reference; exclusion of protected accounts; and a kill switch. Two guards are emphasised: dry-run by default, so a bug produces a preview rather than damage, and a maximum number of targets per run, so a job that suddenly asks to touch hundreds of accounts refuses.
Using AI assistants safely, and knowing what not to automate
AI assistants help explain errors, draft and review scripts, summarise logs and produce first-draft runbooks. The book sets out four disciplines. Do not paste secrets, customer records or log extracts full of personal data into AI tools; redact and use placeholders, and prefer an enterprise service with contractual data-handling guarantees for real data. Verify output in proportion to the stakes, because fluent output is not evidence of accuracy; at Meridian, an assistant's cleanup script used a filter broader than intended and would have deleted resources outside the test environment, caught only because Dev read every line and ran a dry run first. Keep a human accountable for consequential actions. And treat AI agents that can act as privileged automation with least privilege and logging, remembering that instructions hidden in documents, tickets or web pages they read can try to redirect them.
Some work should stay manual: context-dependent judgement, irreversible steps without a human gate, and tasks where a rare error at machine speed outweighs the everyday saving. A manual step may also be the only moment someone notices something odd, so ask what that person was catching before automating them out. The test the author offers is the worst outcome if the input or logic is wrong, happening to every target at once.
KEY POINTS
Key points
- Pick one repetitive, rule-bound task such as offboarding and automate it with guardrails this month.
- Run automation under a dedicated least-privilege identity with vaulted secrets, dry-run by default, a target limit, immutable logs and a kill switch.
- Schedule one read-only report, such as patch compliance, and give it an owner who acts on it.
- Add automatic enrichment to your most common incident type while keeping the response action human.
- Publish a short AI-use rule: no secrets or customer data in AI tools, verify output, and a person approves consequential actions.
- Write down what you will not automate and why.
QUESTIONS
Common questions
- Which IT security tasks should be automated first?
- Start with tasks that are repetitive, rule-bound, costly when done wrong, and easy to verify, such as leaver offboarding, patch-compliance reporting, certificate-expiry monitoring and evidence collection during incidents. Rank candidates by how often they occur multiplied by how painful they are. Decisions that depend on business context, such as whether an alert is a real incident, should stay with people.
- How should a user offboarding script be designed safely?
- The Hardened Stack recommends a script that blocks sign-in and revokes sessions, preserves the mailbox, records group memberships before removing them, reclaims licences after the mailbox is preserved, and flags the device in MDM. It should exclude break-glass accounts, log every step to a ticket, and never hard-delete; final deletion is done by a person after the retention window. It should be triggered by an authorised HR leaver record rather than an informal request.
- What guardrails should security automation scripts have?
- Run each job under a dedicated least-privilege identity, ideally a workload identity with short-lived credentials, and fetch secrets from a vault at runtime. Keep the code in version control with review, log every action immutably, require a ticket reference, exclude protected accounts, and provide a kill switch that stops all automation. Make dry-run the default and set a maximum number of targets per run to limit damage from bugs or bad input.
- Should security responses like disabling accounts be fully automated?
- Only when the detection feeding the action is genuinely trustworthy and the impact is low. The Hardened Stack suggests letting high-confidence, low-impact actions run automatically, such as quarantining an email already confirmed malicious, while staging consequential actions like disabling an account for one-click human approval. The time saving comes mostly from automatic context gathering, not from removing the approval click.
- Is it safe to paste logs or configuration files into an AI assistant?
- Not without redaction. Anything sent to an external AI service should be assumed to leave your control, so remove secrets such as API keys, customer records and personal data, and use placeholders instead. For work involving real data, prefer an enterprise AI service with contractual data-handling guarantees over a free consumer tool.
- How should IT teams check scripts and commands written by AI?
- Verify them in proportion to the consequences, because AI output sounds equally confident whether it is right or wrong. A one-off read-only query may need only a glance, but a script that will run with privileged access against production needs a full line-by-line review and a dry run or test environment first. A person, not the tool, remains accountable for anything consequential.