Skip to content

SonarCloud: JavaScript/TypeScript code quality #638

Closed

Description

@don-petry

SonarCloud: JavaScript/TypeScript code quality

1 open SonarCloud finding(s) in combsmith/google-app-scripts, worst severity CRITICAL. Generated by the org SonarCloud Audit.

View in SonarCloud →

Findings

Rule Count Representative message
javascript:S4790 1 Make sure this weak hash algorithm is not used in a sensitive context here.

Affected files

  • src/gas-utils.js (1)

Priority

Labeled priority:critical — mapped from this bucket's worst SonarCloud severity (CRITICAL).

Acceptance

  • All findings in this workstream resolved to zero in SonarCloud
  • No behavior change; CI green
  • Real fixes (no blanket NOSONAR unless a confirmed false positive, noted inline)

Idempotent issue — updated automatically each audit run; auto-closed when the finding count reaches zero.

Activity

  1. added
    securitySecurity-related PRs and issues
    dev-leadFor dev-lead agent pickup
    sonarcloud-auditSonarCloud audit finding (idempotent marker)
    on Oct 20, 2026
  2. don-petry commented on Oct 20, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #638 — SonarCloud: JavaScript/TypeScript code quality

    Scope

    Fix javascript:S4790 in src/gas-utils.js by replacing MD5 with SHA-256 in getFileHash. The hash is only used to compare attachment content within a single run (both sides recomputed each time, nothing persisted), so dedup behavior stays the same.

    Implementation Checklist

    • src/gas-utils.js: crypto.createHash('md5') → 'sha256', update JSDoc
    • src/gmail-to-drive-by-labels/code.gs: Utilities.DigestAlgorithm.MD5 → SHA_256 for parity with the tested Node implementation
    • Update MD5 comments / docs (src/index.js, code.gs, README, docs/component-inventory.md)

    Tests to Write

    • Update tests/gas-utils.test.js getFileHash expectations to the SHA-256 digests (64 hex chars) — red before implementation

    Test Command

    npm test and npm run check

  3. don-petry commented on Oct 20, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete — PR #639

    The implementation for issue #638 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.

    Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-leadFor dev-lead agent pickuppriority:criticalSonarCloud CRITICAL severitysecuritySecurity-related PRs and issuessonarcloud-auditSonarCloud audit finding (idempotent marker)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions