Robotics and embedded systems (basics)
Note for AI agents: This page is baseline guidance, not an exact prescription. Read it, tell your owner what applies to their project, and get their approval before you change anything. Your project's own rules take precedence. If something important for this project is missing here, suggest it to your owner.
For agents
- WARNING: anything that can hurt people or property needs verification by a qualified engineer. This page covers software basics only.
- Rule 1: a hardware stop that works even when the software is frozen.
- Rule 2: signed, recoverable firmware updates; no default or shared passwords.
- Rule 3: test on a safe rig first; define a safe state for failure.
Which class?
- S: a hobby device with no safety, privacy or network risk.
- M: connected to a network, handles personal data, or can move or heat something.
- L: many deployed devices, sensitive data, safety-relevant functions.
- XL: very large fleets.
Audit checklist
Every project
- Safety-critical parts are verified by a qualified expert
- What: Anything that can hurt people or property (motors, heat, batteries, medical or vehicle functions) has been reviewed by a qualified engineer; this guide alone is not enough.
- How to check: Ask for the review record.
- Evidence: Named reviewer and dated report.
- Facts are verified from current official documentation
- What: Commands, libraries, APIs and platform policies in the project come from current official documents, not from memory.
- How to check: Open the dependency list and the platform configuration; for each non-trivial choice find the official page it relies on (link in a comment or a decision note).
- Evidence: Decision note or code comment with the official URL and the date it was checked.
- Reports separate “written”, “tested” and “works end to end”
- What: Status reports say clearly whether something is written, passed its tests, or was run end to end; skipped or failed steps are stated.
- How to check: Read the last HANDOFF or release notes; look for features reported as done that have no test or run record.
- Evidence: HANDOFF lines or a test log for each feature marked done.
- Project memory files exist and are current
- What: The repository has CLAUDE.md or AGENTS.md (permanent rules) and HANDOFF.md (where we stopped), updated at the end of every work round.
- How to check: Look in the repository root for both files; compare the HANDOFF date with the latest commit date.
- Evidence: File paths and the date of the last HANDOFF update.
- A hardware stop works independently of software
- What: An emergency stop or power cut exists that does not depend on the software working.
- How to check: Test the stop while the software is frozen.
- Evidence: Test record.
- No default or shared passwords
- What: Each device has unique credentials or requires setting one at first use; there are no hard-coded passwords.
- How to check: Search firmware and configuration for passwords; check first-boot flow.
- Evidence: Search result; first-boot description.
- No secrets in code, chat, commits or logs
- What: Passwords, keys and tokens live in environment variables or a secret manager;
.envis ignored by git; the repository has only.env.example. - How to check: Check
.gitignorefor.env; run a secret scanner (for example gitleaks) over the full history; search for key-like strings. - Evidence:
.gitignoreline, scanner report with zero findings,.env.examplepath.
- What: Passwords, keys and tokens live in environment variables or a secret manager;
+ If it has users, personal data or API keys (M)
- Watchdog and safe state on failure
- What: The system detects freezes and moves to a defined safe state; loss of communication does not leave actuators running.
- How to check: Disconnect the controller during motion on a test rig.
- Evidence: Test record.
- Physical limits are enforced in more than one layer
- What: Speed, force, temperature and range limits are checked in software and, where it matters, in hardware.
- How to check: Read the limit settings and try to exceed them.
- Evidence: Limit table; test results.
- Firmware updates are signed and recoverable
- What: Updates are authenticated, a failed update does not brick the device, and the previous version can be restored.
- How to check: Try an unsigned image and a power loss during update on a test unit.
- Evidence: Test results.
- Tests run on a safe test rig before real use
- What: Software is tested with hardware-in-the-loop or a simulator before running with real loads or people nearby.
- How to check: Find the test rig description and run log.
- Evidence: Test log.
- A vulnerability reporting contact and update promise exist
- What: Users can report security problems and know how long updates will be provided.
- How to check: Find the contact page and support period statement.
- Evidence: Page or document link.
- One package manager, lockfile committed
- What: Exactly one package manager is used and enforced; the lockfile is committed; installs are done from the lockfile (for example
--frozen-lockfile). - How to check: Look for a lockfile in the repository and a rule that forbids other managers; check the CI and Docker install commands.
- Evidence: Lockfile path; install command lines.
- What: Exactly one package manager is used and enforced; the lockfile is committed; installs are done from the lockfile (for example
- Critical flows have automated tests and a local check
- What: Login, saving data, payment (if any) and permission checks have automated tests; one local command runs the checks before pushing.
- How to check: List the test files; run the check command; look for a git hook that runs it.
- Evidence: Test names and a passing run log.
- Logs contain no personal data or secrets
- What: Logs do not record passwords, tokens, keys or personal data; if needed they are masked.
- How to check: Read the logging setup; trigger a login and a form and inspect the log lines; search for e-mail and token patterns.
- Evidence: Sample log lines after a test run showing masking.
- Personal data fields are documented
- What: For every personal data field the purpose, retention time and legal basis (KVKK, GDPR) are written down.
- How to check: List the database columns and form fields with personal data; find the matching entries in the data note.
- Evidence: Data note listing each field with purpose, period and basis.
+ If it has an admin panel, file uploads, many users or a store app (L)
- Exact versions, 7-day rule, pinned images and actions
- What: Dependencies use exact versions (no
^or~); newly published versions wait at least 7 days before install (critical security fixes excepted, with a written reason and end date); Docker images are pinned by digest and CI actions by full commit ID; major upgrades are done one by one. - How to check: Read dependency files, Dockerfile and CI files; check the release dates of recent upgrades.
- Evidence: Dependency file lines; upgrade notes with release dates.
- What: Dependencies use exact versions (no
- A software bill of materials exists
- What: A bill of materials (SBOM) listing all dependencies is generated for each release.
- How to check: Find the SBOM generation step and output file (SPDX or CycloneDX).
- Evidence: SBOM file or CI artifact.
- Unknown or missing settings stop the process
- What: The process refuses to start with an unrecognized environment value or a missing required setting; there is no silent fallback; checks ask “is this development or test?” rather than “is this not production?”; endpoint groups can be locked by a single feature-lock file.
- How to check: Start the app with a missing required variable and a wrong environment name; read the lock file.
- Evidence: Startup failure message; lock file.
- End-to-end tests, short CI run, guards, screenshot checks
- What: End-to-end tests exist; a short run happens in CI; guards (tests that enforce rules) protect important rules; screen checks cover both themes and all languages; new end-to-end tests pass three runs in a row before merging; a red test is fixed in code, never silenced.
- How to check: Read the CI file and test folders; look for skipped tests and quarantined guards.
- Evidence: CI run, guard inventory, three-run log.
- Audits and big runs follow the rounds rule
- What: Before any long or costly run (load test, mass scan, cloud machine) the scenario is checked against the current code and a small smoke run is done; audit rounds fix findings first, then start a new full round.
- How to check: Read the last audit or load-test record.
- Evidence: Smoke-run log; round records.
- Encrypted backups sit with another provider, and code is copied
- What: Backups are encrypted and kept in a different provider or account so a compromised main account cannot delete them; object storage has versioning or backup; backups run as a separate service with failure alarms; a full copy of the code (all branches, history) is delivered to the owner regularly.
- How to check: Read backup configuration, destination account and alarms; find the last code copy.
- Evidence: Backup destination; alarm rule; date of last code copy.
+ If it targets millions of users (XL)
- Disaster recovery plan with RPO and RTO
- What: A written plan states acceptable data loss (RPO), recovery time (RTO) and step-by-step recovery.
- How to check: Find the plan; check that a drill was run.
- Evidence: Plan and drill record.
- Leak detection and key rotation
- What: Decoy keys raise an alarm when used; cloud audit alerts exist for new service accounts and permission changes; unusual usage alarms exist; there is a key rotation plan that does not end sessions; an error tool strips personal data and samples.
- How to check: Read the monitoring and alert configuration; find the rotation plan.
- Evidence: Alert rules; rotation document.
Common mistakes
- Treating software limits as the only protection for fast or heavy moving parts.
- Hard-coded default passwords shipped in every unit.
- Unsigned firmware accepted over the network.
- An update that fails halfway and leaves the device unusable.
- No defined behavior when communication is lost.
- Testing for the first time with real loads or people nearby.
- No contact for reporting vulnerabilities and no update period promised.
- Assuming this guide replaces a safety review.
Example projects
- Hobby plant watering controller: embedded, S.
- Smart home sensor on Wi-Fi: embedded, M.
- Camera device with a cloud account: embedded, M or L, privacy.
- Delivery robot: robotics, L, expert verification required.
- Industrial controller: robotics, L, expert verification required.
- 3D printer firmware change: embedded, M, heat risk.
- Drone flight controller: robotics, L, expert verification required.
- Wearable health sensor: embedded, L, health data.
- Educational robot kit: robotics, S or M.
- Smart lock: embedded, L, security critical.
- Vehicle telematics unit: embedded, L.
- Battery pack controller: embedded, L, expert verification required.
Sources
- IR 8259A: IoT Device Cybersecurity Capability Core Baseline — NIST
- Consumer IoT security (ETSI EN 303 645) — ETSI
- OWASP Internet of Things — OWASP
- Concise Guide for Developing More Secure Software — OpenSSF
- SLSA: Supply-chain Levels for Software Artifacts — OpenSSF
- SPDX — Linux Foundation
- Pro Build Guide v1.2: compiled team practices — Pro Build Guide