---
name: rea-artifact-format
description: Add or change a file format that inspect_artifact recognizes and extract_artifact extracts, such as a firmware image, ROM or compiled program container; not for provider-backed native analysis.
---
# REA artifact format
Follow the [artifact format guide](../../../docs/development/artifact-formats.md)
for the files to add, every registration point, the tests and the docs. Start
from the nearest existing format of the same shape and read its parser, reader
and tests before writing code.
## Establish the layout before naming it
Collect real samples with known inputs, such as files compiled from available
sources or images with published specifications. Compare fields across
samples and against those inputs. Name a field only when that comparison or a
specification establishes it; report the rest raw with offsets. Say which
facts are observed, which are inferred and which are unknown, in the code
comments, the guide and the pull request.
Check every claimed field boundary against all samples, not one: a slot that
ends at its text's NUL in every example can still be shorter than assumed.
## Decide what the reader exposes
List stored byte ranges as entries when they are useful to hash, compare or
extract. Mark an entry encrypted only when the format declares it. Bytes that
only look opaque keep a limitation and a neutral name. Decrypting, unpacking
protection or recovering protected content is outside contribution scope
without a maintainer decision; report the limit instead.
When two containers share a layout, prefer one format with a field that
distinguishes them over parallel registrations.
## Keep it bounded and simple
Bound every count and size before allocation. Reuse an existing limit or
control before adding a fixed ceiling, and register any fixed ceiling with its
reason. Do not add settings or mechanisms for unobserved inputs.
<!-- ‹guest · 2026-12-04› -->
Report the sample set, versions and results, the checks you ran, and what the
samples did not cover.
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.