GHOST BREACH / DOCUMENTATION SAMPLES
Evidence. Remediation. Reproducibility.
An illustrative security finding and a reference ESP32-E / MAX98357A build excerpt. Client identifiers are omitted.
See what useful documentation looks like.
An illustrative security finding and a reference ESP32-E / MAX98357A build excerpt, with client identifiers omitted.
1. Explain the finding
An authenticated request can access a record belonging to a different tenant because the lookup omits tenant ownership.
2. Connect the fix to the cause
Illustrative handler fragment. Trusted authentication middleware supplies the tenant; application-specific role and object permissions still apply.
// Scope the record to the authenticated tenant.
const record = await db.records.findFirst({
where: {
id: req.params.id,
tenantId: req.auth.tenantId
}
});
if (!record) return res.sendStatus(404);
return res.json(toPublicRecord(record));
Retest: allowed tenant, different tenant, unauthenticated caller, and every route or method that exposes the record.
1. Reference pinout & audio hardware
ESP32-E with dual MAX98357A amplifiers and RT9080 regulation. GPIO mappings below are from the supplied build excerpt.
Scroll to inspect every pin and harness column →
| Component | Signal | MCU pin | Harness / note |
|---|---|---|---|
| MAX98357A #1 / #2 | I2S LRC / word select | GPIO 26 |
Yellow · 22 AWG |
| MAX98357A #1 / #2 | I2S BCLK / bit clock | GPIO 25 |
Blue · 22 AWG |
| MAX98357A #1 / #2 | I2S DIN / audio data | Firmware-selected | Match data_out_num to the schematic |
| MAX98357A #1 / #2 | SD / MODE control | GPIO 14 |
Orange · check boot/reset mute state |
| Wake switch | RTC deep-sleep wake | GPIO 27 |
Brown · verify wake behavior |
The source excerpt does not specify DIN’s GPIO. Use the matching firmware and schematic for that assignment.
2. Native C firmware & offline flashing
The reference package pairs ESP-IDF C source with Windows/macOS/Linux flashing instructions and a bill of materials.
#!/usr/bin/env bash
# Reference ESP32 build; legacy esptool 4.x syntax
set -euo pipefail
: "${PORT:?Set PORT to the connected ESP32 serial port}"
esptool.py --chip esp32 --port "$PORT" --baud 921600 write_flash -z \
0x1000 bootloader.bin \
0x8000 partition-table.bin \
0x10000 stadium_blueprint_prod.bin
Offsets shown are for this ESP32 reference layout. Match the build’s generated flash arguments when using other images or boards.