Skip to content

Address SonarQube reliability/type findings in CLM sample flows#95

Merged
DavidEGutierrez merged 7 commits into
feature-added-clm-demofrom
copilot/sub-pr-94
May 15, 2026
Merged

Address SonarQube reliability/type findings in CLM sample flows#95
DavidEGutierrez merged 7 commits into
feature-added-clm-demofrom
copilot/sub-pr-94

Conversation

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to the SonarQube feedback on PR #94 for the CLM demo: this narrows down reliability and type-safety issues in the newly added CLM codepaths (auth/access control, agreement create/sign, template edit, login title rendering).
The update focuses on removing unsafe patterns and tightening typings without changing feature scope.

  • Access control cleanup

    • Removed unused callback parameters in auth and ACL handlers to eliminate noise and static-analysis flags.
  • Agreement creation hardening

    • Added explicit null guards before using WebViewer/PDFNet instances and generated documents.
    • Replaced weak select-item typing with concrete UserSelectItem / TemplateSelectItem types.
    • Normalized and validated PDF buffer handling before base64 encoding to avoid unsafe assumptions.
  • Agreement signing safety

    • Guarded WebViewer Core access before document/annotation operations.
  • Template edit safety

    • Replaced non-null assertion usage with explicit Core existence checks.
  • Login page type correctness

    • Updated ThemedTitle props to match current refine typings (text, collapsed).
const core = wvInstance.current?.Core;
if (!core) return;
const { documentViewer, annotationManager } = core;

Resources

Checklist

  • I understand that this is a public repo and my changes will be publicly visible

If you are adding a new sample

  • I have added an entry to the root level README
  • The name of my sample is consistent with the other samples
  • I have added a README to my sample
  • The sample is fully functional
  • I have updated lerna.json with the new sample name

If you are removing an old sample

  • I have removed the entry from the root level README
  • I have removed the sample from lerna.json

Copilot AI and others added 2 commits May 13, 2026 20:28
Agent-Logs-Url: https://github.com/ApryseSDK/webviewer-samples/sessions/4a8541ca-c9e7-41ee-aa74-6d8e4306d442

Co-authored-by: DavidEGutierrez <172812369+DavidEGutierrez@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ApryseSDK/webviewer-samples/sessions/4a8541ca-c9e7-41ee-aa74-6d8e4306d442

Co-authored-by: DavidEGutierrez <172812369+DavidEGutierrez@users.noreply.github.com>

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • sonarcloud.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • telemetry.refine.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/webviewer-samples/webviewer-samples/webviewer-clm/node_modules/.bin/refine build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/webviewer-samples/webviewer-samples/webviewer-clm/node_modules/.bin/refine build r (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/webviewer-samples/webviewer-samples/webviewer-clm/node_modules/.bin/refine build git mple�� get --global t committer.email (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] [WIP] Address SonarQube feedback for CLM demo feature pull request Address SonarQube reliability/type findings in CLM sample flows May 13, 2026
Copilot AI requested a review from DavidEGutierrez May 13, 2026 20:34
Copilot AI and others added 4 commits May 15, 2026 12:53
…package to webviewer-clm

Co-authored-by: DavidEGutierrez <172812369+DavidEGutierrez@users.noreply.github.com>
…ix XSS and arbitrary file read vulnerabilities

Agent-Logs-Url: https://github.com/ApryseSDK/webviewer-samples/sessions/b8ec9fcf-141d-4039-aee6-593a2df37578

Co-authored-by: DavidEGutierrez <172812369+DavidEGutierrez@users.noreply.github.com>
…E, <= 11.8.0)

Agent-Logs-Url: https://github.com/ApryseSDK/webviewer-samples/sessions/b8ec9fcf-141d-4039-aee6-593a2df37578

Co-authored-by: DavidEGutierrez <172812369+DavidEGutierrez@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@DavidEGutierrez DavidEGutierrez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These changes look good.

@DavidEGutierrez DavidEGutierrez marked this pull request as ready for review May 15, 2026 13:28
@DavidEGutierrez DavidEGutierrez requested a review from jgozner May 15, 2026 13:35
Copilot AI requested a review from DavidEGutierrez May 15, 2026 14:39

@jgozner jgozner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@jgozner-apryse jgozner-apryse 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.

LGTM

@DavidEGutierrez DavidEGutierrez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good.

@DavidEGutierrez DavidEGutierrez merged commit 6d7b54d into feature-added-clm-demo May 15, 2026
3 checks passed
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.

4 participants