A secure configuration baseline is a versioned record of the security settings a product is intended to ship with. Configuration drift occurs when the effective settings of a product or release diverge from that approved baseline. Under the EU Cyber Resilience Act (CRA), manufacturers should treat such differences as a product-security engineering concern: a release that inadvertently enables a network service, changes permissions or weakens authentication may undermine the product's secure-by-default design.
This guide explains how to define a baseline, compare successive releases, classify drift and retain useful evidence. The workflow is an engineering recommendation, not a configuration-file format prescribed by the CRA.
Regulatory basis: secure by default is a product property
Regulation (EU) 2024/2847 establishes essential cybersecurity requirements for products with digital elements. Annex I Part I requires a product to be designed, developed and produced to ensure an appropriate level of cybersecurity based on its risks. Among its specific requirements are making products available with a secure-by-default configuration, including the possibility to reset the product to its original state, and ensuring protection from unauthorised access by appropriate control mechanisms.
The requirements are risk-based and subject to the applicability language in Annex I. They do not prescribe a universal configuration manifest, a particular scanner or an identical hardening profile for all product classes. Article 13 connects the manufacturer's cybersecurity risk assessment to product design, development and production. The main CRA product requirements apply from 11 December 2027; the separate reporting obligations have applied since 11 September 2026. The Commission's July 2026 implementation guidance provides non-binding interpretation and examples.
The ENISA Secure by Design and Default Playbook, published on 30 July 2026, provides practical implementation guidance for smaller organisations. Its emphasis on secure defaults, repeatable configuration and change control supports baseline-based release review. Neither the playbook nor the recommendations below replace the legal text or a product-specific risk assessment.
Define what belongs in the baseline
A useful baseline captures security-relevant effective behaviour, not just a copy of an arbitrary configuration file. Start with the approved product variant and release, then identify settings that change the attack surface or protection of assets.
| Area | Example baseline assertion | Typical verification | | --- | --- | --- | | Network exposure | Only documented management and application ports listen | Port inventory from the target image or device | | Accounts | No shared default administrative password | Provisioning and first-boot test | | Services | Diagnostic shell disabled in production | Service state and boot test | | Authentication | Privileged interfaces require approved authentication | Negative and positive access tests | | Cryptography | Approved TLS settings and certificate validation enabled | Configuration inspection and handshake test | | Filesystem | Sensitive paths have restricted permissions | Permission and ownership assertions | | Logging | Security-relevant events reach the configured log sink | Trigger and inspect a test event | | Updates | Package verification and recovery behaviour remain enabled | Signed-update and failure-path tests |
The examples are not blanket legal prescriptions. The appropriate controls depend on the product, intended use, operating environment and documented risk assessment. A headless industrial gateway and a consumer mobile application may need very different baselines.
Assign each assertion an identifier, rationale, verification method and owner. Store the expected value separately from any observed value. This prevents a release build from silently redefining its own pass criteria.
Establish an authoritative baseline per product context
Avoid a single organisation-wide file that obscures meaningful differences. A baseline should specify at least the product identifier, hardware or software variant, applicable release family, environment, configuration profile and approved revision.
For example, a production gateway might have a baseline asserting that a debug UART is disabled and a maintenance port is closed. A laboratory profile may legitimately permit those interfaces. The two profiles should be explicitly named, not conflated. Otherwise a comparison could either flag every laboratory build as defective or, worse, accept a production release because the permissive laboratory profile was used.
Keep baseline changes under review. An engineer proposes a change, records why it is necessary, links the affected threat or requirement and identifies who approves it. The new baseline becomes authoritative only after the review. A changed baseline is not proof that the new settings are safe.
Detect drift at three different points
1. Source and build configuration. Compare checked-in configuration templates, device-tree choices, service enablement, container definitions and packaging options with the approved baseline. Detect accidental changes before the release artifact exists. This is fast but may miss runtime defaults introduced by dependencies or startup scripts.
2. Release artifact. Inspect the exact firmware image, container image or software package intended for distribution. Extract relevant settings and inventory exposed services and accounts. Record the artifact digest. This step helps distinguish a reviewed source change from what was actually packaged.
3. Effective runtime state. Boot a representative device or test environment and observe active services, permissions, authentication policy and update configuration. Some settings depend on first-boot provisioning, environment variables or migration scripts and cannot be established by static inspection alone.
For each stage, report the baseline revision, artifact identity, test environment, timestamp, assertion results and differences. A successful source comparison does not replace an artifact or runtime check when those are necessary to validate the risk.
Classify differences instead of treating every change alike
A raw configuration diff is not a security decision. Sort detected differences into actionable categories:
- Unexpected weakening: a previously disabled network service becomes accessible or an authentication requirement is removed. Investigate and normally block release pending a risk decision.
- Expected security improvement: a weak protocol is disabled or access restrictions are tightened. Verify compatibility and update the approved baseline after review.
- Justified operational exception: a customer-specific interface is enabled for a documented deployment need. Record scope, compensating controls, owner and expiry or review condition.
- Non-security change: a display label or unrelated tuning value changes. Document why it is outside the security baseline rather than silently suppressing the diff.
- Unknown: insufficient evidence exists to determine the effective behaviour. Keep the finding open until it can be tested or assessed.
Severity should reflect exploitability, exposure, affected assets and the product's intended environment. A change in a debug service on a physically isolated prototype has a different risk profile from the same service exposed on a production network. Neither should be approved solely by its filename or by the number of changed lines.
Example: a firmware release that re-enables a diagnostic service
Assume gateway release 3.4 disables an unauthenticated diagnostic listener by default. Release 3.5 updates a vendor component; the packaging script now enables the listener on boot.
A source-only review may miss the new service because the application code is unchanged. An artifact inspection detects a new service unit, while the runtime test confirms that the listener is active on a production interface. The baseline assertion fails. The release owner should establish whether the service is reachable in intended deployments, whether it permits sensitive actions and whether the change was authorised.
A defensible resolution might be to disable the listener in the release image, add a regression test and rerun the checks. If the service is essential, the team must assess and approve the alternative security design, document access restrictions and update the baseline through change control. Merely changing the expected value to green is not a remediation.
Build a repeatable release gate
A lightweight pipeline can produce a machine-readable comparison and a human-readable decision record. The pipeline should:
- Resolve the approved baseline for the exact product, variant and release profile.
- Identify the candidate artifact by immutable digest or equivalent identifier.
- Run static and runtime assertions appropriate to the product.
- Emit structured findings with expected and observed values, severity and evidence links.
- Require review of security-relevant deviations before a release decision.
- Retain the results, exceptions and approval alongside the release identity.
A gate can be advisory for low-risk findings and blocking for defined critical controls. The policy must be explicit: an automated green result is evidence that selected assertions passed, not a guarantee of security or CRA conformity. Similarly, a justified exception is a documented decision, not an automatic waiver of regulatory duties.
Evidence that survives the next release
A practical evidence package links the baseline version, risk-assessment reference, release artifact digest, test results, deviations, reviewer decisions and the final release outcome. Retain the old record when a later release changes a control. This allows reviewers to reconstruct what the team knew and approved at the time rather than viewing only today's configuration.
For example, store a row with product=gateway-A, variant=industrial, release=3.5, baseline=prod-12, artifact_sha256=..., assertion=NET-004, result=fail, decision=blocked and links to the test output and issue. Use actual hashes in production records, not placeholders. A subsequent corrected build should create a new evidence record rather than overwriting the failure.
Where field installations allow customer configuration, distinguish the manufacturer's shipped defaults from user-modified operational settings. The manufacturer should still assess risks of foreseeable configuration choices and document safe guidance. A customer's post-installation change is not necessarily evidence that the manufacturer's released default was insecure.
Common mistakes to avoid
Do not compare only text files while ignoring effective runtime state. Do not let the candidate build select an unreviewed baseline. Do not mix laboratory and production profiles. Do not label every difference a vulnerability or every approved exception harmless. Do not claim that a single automated comparison fulfils the CRA's entire secure-by-default or vulnerability-handling requirements.
Also avoid losing historical evidence when the baseline evolves. A comparison without its exact artifact, baseline version and reviewer decision is difficult to reproduce later.
Connecting configuration evidence to the release decision
The operational challenge is keeping configuration test results, exceptions and release decisions attached to the correct product version rather than scattered across build logs and tickets. AA-sec is designed around traceability between product lifecycle context, requirements, security evidence and human decisions. Its MVP scope includes release blockers and evidence packages; these are being built to complement existing engineering and CI/CD systems, not to replace their builds or make conformity decisions automatically.
Practical next step
Select one production variant and five high-impact configuration assertions. Capture the approved values, run them against the next candidate artifact and on a representative booted system, and review every deviation with the product-security owner. Only then expand coverage. This creates a measurable starting point for configuration governance without pretending that a checklist alone establishes CRA conformity.
