Skip to content

fix security.md + dedupe gen5 byte readers - #41

Closed
abdulsaheel wants to merge 1 commit into
audit/fixes-round3-protocolfrom
audit/fixes-round4-protocol
Closed

fix security.md + dedupe gen5 byte readers#41
abdulsaheel wants to merge 1 commit into
audit/fixes-round3-protocolfrom
audit/fixes-round4-protocol

Conversation

@abdulsaheel

@abdulsaheel abdulsaheel commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

security.md was copy-pasted from edge and referenced a "README" section on sideloading/rooted devices that this repo's README never has (this is a pure-dart lib, no app, no store builds, no firebase). rewrote it for what this repo actually is and pointed app-distribution/privacy stuff at edge's own docs.

also deleted the hand-rolled _u16/_i16/_u32 in gen5_records.dart — the file already has a _view() ByteData helper used everywhere else for endian reads, no reason for a second one.

ran the gen5 tests + full suite, all green.

Summary by Sourcery

Clarify the package security boundary and remove redundant Gen5 byte-reading helpers.

Enhancements:

  • Align the security policy with this repository’s pure-Dart library scope and direct app-level security and privacy concerns to the edge project.
  • Consolidate Gen5 record integer decoding around the existing endian-aware byte-view helper.

Documentation:

  • Update SECURITY.md to define the package-specific security scope and exclusions.

Tests:

  • Run the Gen5 tests and full test suite successfully.

security.md was copied from edge and pointed at a readme section on
sideloading/rooted devices that doesn't exist here — this is a pure-dart
lib with no app, no store builds, no firebase, no db. rewrote it for
that and pointed app-distribution questions at edge's own docs.

also killed the hand-rolled _u16/_i16/_u32 in gen5_records.dart, the
file already has a _view() helper for endian-aware reads everywhere
else, no reason for a second copy.
@sourcery-ai

sourcery-ai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates the security policy to accurately scope this pure-Dart decoding library and removes duplicated Gen5 byte-reading helpers by using the existing ByteData path, with behavior-preserving little-endian decoding.

File-Level Changes

Change Details Files
Reworked the security policy to describe this repository’s actual pure-Dart library scope and defer app-level concerns to the dependent application.
  • Added the package architecture and non-networked/non-storage boundaries.
  • Narrowed in-scope reports to exploitable malformed-byte decoding and unintended command transmission.
  • Removed app-specific data, distribution, telemetry, and backend guidance and linked the relevant edge documentation.
SECURITY.md
Unified Gen5 optical field decoding around the existing endian-aware ByteData helper.
  • Replaced the local unsigned and signed integer readers with _view(...).getUint16/getInt16/getUint32 calls.
  • Deleted the redundant hand-rolled reader implementations while preserving little-endian offsets and signedness.
lib/src/gen5_records.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6c57d667-b076-4d66-8799-993c009a3a46

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@abdulsaheel

Copy link
Copy Markdown
Contributor Author

squashed into #42 for one clean review — closing this round.

@abdulsaheel
abdulsaheel deleted the audit/fixes-round4-protocol branch August 29, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant