Design defensive Bash automation with explicit status handling, bounded concurrency, controlled environment, safe argument construction and non-destructive file planning. Understand the limits of local validation. Complete the linked practice, projects and offline cumulative assessment.
Learning outcomes
Earn a cryptographically verifiable Certificate of Completion to showcase on LinkedIn and your resume upon finishing all module lessons and assessments.
Preserve failure status across conditional execution and cleanup; identify contexts where errexit does not act. Practice: Complete Failure-aware Wrapper. Compare a failing command in an if condition with the same command in an ordinary list; design an optional-variable default and record the wrapper status before and after cleanup.
Define regression assertions for security-relevant input boundaries and distinguish static checks from behavioral evidence. Practice: Complete Regression Test Suite. Add a synthetic boundary case with a literal wildcard and an empty argument; compare exact bytes and exit status rather than matching a success substring. Run bash -n and record optional tool availability.
Collect every owned child status, bound concurrent work and distinguish cooperating locks from access control. Practice: Complete Bounded Worker Pool in a disposable directory. Compare a successful and failing task batch and inspect start/end events. Sketch an advisory-lock protocol for a separate synthetic report; do not signal unrelated processes.
Distinguish interactive and noninteractive startup and identify environment inputs that can alter execution. Practice: In a disposable workspace write a trusted startup fixture containing a fixed marker. Compare a child Bash with and without BASH_ENV using a controlled environment; inspect history and completion configuration conceptually, without reading personal configuration.
Separate shell dialect, utility dialect and locale assumptions; define a small test matrix. Practice: Complete Portable Text Reporter. Run public cases under Bash and any available supported shell using the V37 runner documentation; record missing shells rather than claiming a pass. Compare a final line with and without a newline.
Predict expansion and parser context, fixed-name nameref effects and pipeline state boundaries under explicitly named options. Practice: Compare a quoted array expansion with assignment context; create a fixed-name nameref to a synthetic variable, then compare lastpipe enabled and disabled with job control off. Avoid taking a variable name or arithmetic expression from untrusted input.
Separate data from code, validate file-operation plans and describe the limits of prechecks, logging and dependency verification. Practice: Complete Safe Rename Planner using only synthetic files. Test a space-containing name, duplicate source and existing or symbolic-link destination. Write a threat-boundary note covering trusted executable lookup, secrets excluded from traces and concurrent filesystem changes.