A read handler drops the full characteristic value into a debug line. If that value is a key or an identifier, your log now holds it too.
What goes wrong
A read handler formats the entire characteristic value straight into a debug string. Whatever that characteristic carries is now in the log, verbatim. It could be a credential. It could be application data caught mid-transfer. The handler takes whatever is there, the same way.
Reach is the problem. Debug logs get shipped to collectors and tailed by tools, and read by far more people than the one engineer who wrote the line. A value meant to exist only for the length of a transfer now sits in a store with weaker access rules than the data deserved.
Whether this bites depends entirely on what flows through that characteristic. That is the reason not to log it blind. The handler does not know what it holds, and the log keeps everything you give it.
The pattern
void onReadRequest(Characteristic c) {
log('read value=' + c.getValue());
respond(c.getValue());
}void onReadRequest(Characteristic c) {
log('read id=' + c.getUuid() + ' len=' + c.getValue().length);
respond(c.getValue());
}Grounding and reachability checked out, then the exploit-path gate failed to stand up. The pipeline recorded the finding as disproven and signed that result, so the same false alarm will not come back next quarter.
Why it matters to you
The moment sensitive bytes hit a general purpose log, your blast radius is everyone who can read that log, which is usually wider than you think. Treat a characteristic value like a response body. You would not print a response body to logs on every request, so do not print this one.
Check your own code
- Find every log statement that includes a characteristic value or getValue() result.
- Log the identifier and length, never the contents.
- Route protocol debugging behind an explicit debug build, off by default.
- Review what each characteristic can carry and treat secret-bearing ones as unloggable.