Skip to content

Audit redaction is top-level only; whitelisted fields like notes/bio persist PII verbatim #88

Closed

Description

@cybermax4200

Why this matters now: The audit log is meant to be safe to retain; currently it can store raw user-entered PII (proof notes, bios) and nested objects unredacted.

Problem / What: redactDetails (audit.ts:56-68) only inspects top-level body keys against a whitelist. notes (proof.review / validator.review) and bio are whitelisted and stored verbatim; nested objects/arrays are not traversed for PII. The audit details column thus contains free-text PII.

Key Challenges: Defining a PII-safe redaction policy that also handles nested structures and known-sensitive fields, while preserving the operational value of the log.

Acceptance Criteria:

  • No raw free-text user input (notes, bio) is stored unredacted in AuditLog.details; nested PII is handled.
  • A test feeds PII-laden bodies and asserts redaction in the stored row.

Relevant files/functions: src/middleware/audit.ts:17-68, src/services/auditService.ts:60-77.

Out of scope: Encrypting the audit table at rest.

Labels: advanced, security, bug

Activity

  1. aweledavid3 commented on Aug 22, 2026

    @aweledavid3
    Contributor

    Hi maintainer I will like to work on this isssue

  2. grantfox-oss commented on Aug 22, 2026

    @grantfox-oss

    🦊 GrantFox — @aweledavid3 has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #88)
    2. Your PR will be reviewed by the ecotask-network maintainers

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Aug 24, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @aweledavid3's PR #96 was approved and merged by @cybermax4200.

    🏆 @aweledavid3: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (344 total points). Track your full progress on GrantFox.

    👏 Great work, @aweledavid3! Keep contributing to ecotask-network.

  4. added a commit that references this issue on Aug 24, 2026
    a38de87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignadvancedbugSomething isn't workingsecurity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions