Skip to content

fix: harden Psalm with server-aware context and related signing fixes#7891

Open
vitormattos wants to merge 15 commits into
mainfrom
fix/psalm-hardening-active-signings
Open

fix: harden Psalm with server-aware context and related signing fixes#7891
vitormattos wants to merge 15 commits into
mainfrom
fix/psalm-hardening-active-signings

Conversation

@vitormattos

@vitormattos vitormattos commented Jul 11, 2026

Copy link
Copy Markdown
Member

📝 Summary

This PR hardens LibreSign's Psalm setup while cleaning up the related code paths that surfaced during the tightening work.

  • extracts ActiveSigningsService from AdminController and adds focused unit coverage
  • restores Files app event wiring for sidebar/additional script integration
  • normalizes CRL serial handling so decimal and hexadecimal serial inputs are rendered correctly in generated CRLs
  • aligns Psalm with the real nextcloud/server type context, including server-owned OCA/*, sabre/*, and doctrine/dbal dependencies
  • updates the Psalm CI and baseline workflows to run inside a nextcloud/server checkout instead of duplicating server 3rdparty packages in LibreSign
  • simplifies the twofactor_gateway integration by delegating to the upstream GatewayDirectIntegrationService
  • keeps the Psalm baseline empty while ratcheting high-signal issue families to error

🔜 Follow-up

A full exploratory Psalm run with errorLevel="1" still reports real code issues, so this PR intentionally stops at infrastructure and targeted ratcheting instead of lowering the global level in one jump.

The next focused cleanup should target the issue families that showed up most often:

  • Mixed*
  • ClassMustBeFinal
  • RiskyTruthyFalsyComparison
  • nullability issues such as PossiblyNullReference and PossiblyNullArgument

Once those families are reduced in focused follow-up PRs, we can safely revisit lowering the global Psalm error level.

@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Jul 11, 2026
@vitormattos vitormattos marked this pull request as draft July 11, 2026 12:44
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos force-pushed the fix/psalm-hardening-active-signings branch from a56958c to 9192c41 Compare July 13, 2026 18:22
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos requested a review from YvesCesar July 13, 2026 21:36
@vitormattos vitormattos marked this pull request as ready for review July 13, 2026 21:36
@vitormattos vitormattos changed the title chore: tighten psalm analysis and related fixes fix: harden Psalm with server-aware context and related signing fixes Jul 13, 2026
@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable34

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable33

@vitormattos

Copy link
Copy Markdown
Member Author

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 0. Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant