Introduces automated unused-dependency detection (FKITDEV-8239 “Függőségcsökkentés”) by adding a warn-only depcheck CI job and .depcheckrc.json to all five repos: vuer_oss, vuer_css, portal_css, esign_oss, esign_css. Committed (solo-author) and pushed 2026-06-23 on chore/FKITDEV-8239-depcheck-ci (based on origin/devel) in all 5 repos; no PRs created yet (compare links provided). Per-repo work lives in sibling worktrees <repo>-FKITDEV-8239, preserved for PR iteration.
Ticket Background
The ticket (Hungarian: “Függőségcsökkentés”) requests automated detection of unused dependencies. peter.szollar’s spec called for:
depcheckin CI — static analysis of import/require usage vspackage.json, warn-only, tooling deps on an ignore list- Yarn Constraints — enforce correct
dependencies/devDependenciesclassification
Bence (assigned to andras.lederer) specified the depcheck step should go into GitHub Actions in: vuer_oss, vuer_css, portal_css, esign_oss, esign_css.
Yarn Constraints is NOT viable — not implemented
All 5 repos are Yarn Classic v1 (
# yarn lockfile v1,.yarnrc, nopackageManagerfield). Yarn Constraints is a Yarn Berry (v2+) feature only. This is documented as a follow-up requiring a Berry migration — it was not implemented in this ticket.
What Was Built (All 5 Repos)
Each repo gets two files added:
.github/workflows/pull-request.yaml — depcheck job
An additive depcheck job inserted into the existing workflow. Key properties:
- Non-blocking:
continue-on-error: trueon the depcheck step; the job is in NO other job’sneeds:graph — it can never block a PR - Actions versions:
actions/checkout@v6,actions/setup-node@v6(matching each repo’s existing conventions) - Node version:
node-version: ${{ env.NODE_VERSION }}whereNODE_VERSION: "24"(matching surrounding jobs) - Yarn cache:
cache: yarn,cache-dependency-path: yarn.lock - Install command varies per repo:
vuer_oss:yarn --frozen-lockfile(matches its existing jobs)vuer_css,portal_css,esign_oss,esign_css:yarn install --frozen-lockfile
- Tool invocation:
npx -y depcheck@1.4.7(pinned version)
npx -y is correct on both CI and locally
npx -y depcheck@1.4.7 --versionreturns1.4.7(exit 0) and a real run returns clean JSON (exit 0) on macOS npm 10.9.8 / node v22.22.3 — verified twice. There is no npx breakage. The CI invocation is correct on all environments.
.depcheckrc.json — ignore config (repo root)
Two keys: ignores (package names / globs) and ignore-patterns (file/dir paths, kebab-case).
ignores policy — two categories:
Build/test/lint/dev tooling (not directly imported in app source):
- ESLint:
eslint,eslint-*,@eslint/* - Prettier:
prettier - Babel:
@babel/*,babel-* - Jest:
jest,jest-*,ts-jest,@jest/* - Semantic release:
semantic-release,@semantic-release/* - Husky/commitizen/commitlint:
husky,commitizen,cz-conventional-changelog,@commitlint/* - TypeScript:
typescript,ts-node - Various CLI tools:
*-cli,license-checker,improved-yarn-audit - Other dev tooling added per-repo as needed
Dynamically-loaded runtime deps (depcheck cannot trace statically):
pg,pg-hstore— loaded by Sequelize via dialect string (not directly imported)postcss,autoprefixer— consumed by build pipeline config, not app source- Other genuinely-dynamic deps flagged per-repo
ignore-patterns — generated/vendored output only:
web/js,web/css,web/branding,web/libs— vendored assets (jQuery etc.) not in npmtest/coverage, build output dirs — generated output- Test dirs are NOT excluded — depcheck must scan them to detect devDep usage
Per-Repo Unused-Dependency Candidates Surfaced
These are advisory signals for the team — NOT auto-removals. Flagged on first run after tuning the ignore config.
| Repo | Candidates flagged | Notes |
|---|---|---|
vuer_oss | soap, umzug | Direct runtime deps with 0 traced imports |
vuer_css | add | |
portal_css | lodash, tmp, tough-cookie | See critical note below |
esign_oss | ajv, fast-xml-parser, inquirer, jsdom, protobufjs, umzug | Many are resolutions CVE-pin entries — not necessarily dead, flagged for team audit |
esign_css | license-checker, postcss | license-checker used in extensionless bin/credits script (borderline); postcss is build-pipeline |
portal_css: over-suppression bug found and FIXED
The initial portal_css config added
lodash,tmp, andtough-cookietoignores— incorrectly. These are genuinely-unused direct runtime dependencies: 0 imports across ~190 source files; they appear only in transitive/resolutionsentries. Adding them toignoreshides exactly the unused-dependency signal this ticket exists to surface. This was a real defect caught during independent final review. Fixed: those three were removed fromportal_css’signoresso depcheck now correctly flags them.
Final Review Verdict
| Repo | Verdict |
|---|---|
vuer_oss | SHIP as-is |
vuer_css | SHIP as-is |
portal_css | NEEDS-FIX (over-suppression) → FIXED |
esign_oss | SHIP as-is |
esign_css | SHIP as-is |
Minor “pointless-noise” ignore entries (livereload, istanbul-*, autoprefixer, browser-sync) were left in place as defensible build/dev tooling across repos — not worth removing.
Verification (2026-06-23)
An adversarial deep-review pass found NO bugs. The depcheck CI work is correct and ready to ship as-is. Confirmed:
actionlintv1.7.12 passes clean (exit 0, zero findings) on all 5 workflows — full GitHub Actions schema + expression validation, not just YAML well-formedness.- All 5 diffs are purely additive vs
origin/devel— 31 insertions, 0 deletions total; no existing job is modified. ${{ env.NODE_VERSION }}(value"24") is defined at workflow level and resolves in all 5 workflows.- The exact CI invocation — bare
npx -y depcheck@1.4.7— auto-discovers.depcheckrc.json(confirmed working). - The 5 depcheck job blocks are byte-identical except the one intended install-spelling difference:
yarn --frozen-lockfileinvuer_ossvsyarn install --frozen-lockfilein the other four. - depcheck runs warn-only on all 5 — it exits 255, absorbed by
continue-on-error.unused_devDeps=[]everywhere (all tooling ignores applied). Final candidates:vuer_oss:soap,umzugvuer_css:addportal_css:lodash,tmp,tough-cookie+ a genuine missing devDependencyistanbul-lib-coverageesign_oss:ajv,fast-xml-parser,inquirer,jsdom,protobufjs,umzug(theresolutionsentries are CVE pins — advisory only)esign_css:license-checker,postcss
Merge-time operational note — keep the check warn-only
Do NOT add the new
Unused Dependenciesstatus check to branch-protection required checks. The job stays advisory only because nothing blocks on it (continue-on-error+ noneeds:edge). Promoting it to a required check would defeat the warn-only design and start failing PRs on every flagged candidate.
Pushed (2026-06-23)
Committed solo-author (andras.lederer <andras.lederer@alpiq.com>, no Co-Authored-By) and pushed to git@github.com:TechTeamer/<repo> on branch chore/FKITDEV-8239-depcheck-ci for all 5 repos. Each commit is exactly 2 files (the workflow + .depcheckrc.json), conventional message chore(ci): add warn-only depcheck job for unused dependencies (FKITDEV-8239).
| Repo | Commit |
|---|---|
vuer_oss | 0e7bd6377e |
vuer_css | 7913f181c |
portal_css | ac15b91d |
esign_oss | 47d6a5c |
esign_css | 93ccd9f |
Why
--no-verifywas neededCommits were made with
--no-verify: the worktrees have nonode_modules, so husky/lint-staged hooks can’t run. The changes were instead validated independently with actionlint (workflows) + depcheck (config) — see the Verification section.
No PRs created yet (per the no-auto-PR rule). Compare links to open them:
https://github.com/TechTeamer/vuer_oss/compare/devel...chore/FKITDEV-8239-depcheck-ci?expand=1https://github.com/TechTeamer/vuer_css/compare/devel...chore/FKITDEV-8239-depcheck-ci?expand=1https://github.com/TechTeamer/portal_css/compare/devel...chore/FKITDEV-8239-depcheck-ci?expand=1https://github.com/TechTeamer/esign_oss/compare/devel...chore/FKITDEV-8239-depcheck-ci?expand=1https://github.com/TechTeamer/esign_css/compare/devel...chore/FKITDEV-8239-depcheck-ci?expand=1
SonarCloud gate fix (2026-06-23)
After the depcheck PRs were opened, SonarCloud’s “Security Rating on New Code” quality gate FAILED on 4 of the 5 PRs. The new workflow lines tripped SonarCloud’s GitHub-Actions supply-chain rules — even though the existing jobs already use the same patterns (those are grandfathered as old code; only the PR’s new lines are gated).
What tripped the gate
| Flagged construct | SonarCloud rule rationale |
|---|---|
npx -y depcheck@1.4.7 | ”can install packages on-demand…” (on-demand install). Confirmed driver: vuer_css failed with npx as its only flagged finding. |
yarn install --frozen-lockfile | ”lifecycle scripts…” (install can run arbitrary lifecycle scripts) |
actions/checkout@v6, actions/setup-node@v6 | ”Use full commit SHA” (unpinned actions/*@v6 references) |
Per-repo quality profiles differ
The set of flagged findings is not uniform across repos — it depends on each project’s SonarCloud quality profile.
vuer_cssflagged onlynpx;portal_cssflagged all three (npx+yarn install+ unpinned SHAs). Don’t assume one repo’s findings match another’s.
Fix applied (3 options considered)
Three resolutions were on the table: (a) exclude .github/** from Sonar analysis; (b) replace npx with a pinned devDependency invocation + pin all actions to full commit SHAs; (c) accept/triage the findings in SonarCloud. Chosen: option (a) — appended .github/** to sonar.exclusions in each repo’s sonar-project.properties. It was already present in sonar.coverage.exclusions, so this only extends the existing exclusion to the analysis scope. Committed solo-author (andras.lederer) and pushed:
| Repo | sonar-fix commit |
|---|---|
vuer_oss | c2b5cfcb3f |
vuer_css | 93c9d976e |
portal_css | 7ee62cbd |
esign_oss | 4e96053 |
esign_css | 9f9b862 |
Verification — gh pr checks
All 5 PRs green (SonarCloud Code Analysis = pass):
| PR | Repo | State |
|---|---|---|
| #3076 | vuer_css | ✅ green |
| #703 | portal_css | ✅ green |
| #353 | esign_oss | ✅ green |
| #253 | esign_css | ✅ green |
| #8001 | vuer_oss | ✅ green (was red — pre-existing test fail, since RESOLVED — see below) |
Historical: vuer_oss #8001 was briefly red on a pre-existing Unit Tests failure (RESOLVED 2026-06-23)
When the depcheck PRs first opened, vuer_oss #8001 was red — not SonarCloud and not caused by the depcheck/sonar changes. It was a pre-existing Unit Tests failure in
test/tests/unit/services/archive-services/self-service-room-archive-service.test.js— 2 tests failed (archive + restore a self-service room), with a “Cannot log after tests are done” async-leak smell (3512 pass / 2 fail). Because the branch wasdevel+ CI-config-only files, the same 2 tests failed ondevelitself; sonar/build were skipped behind the test job, so they never ran. See the resolution below.
vuer_oss #8001 unblocked — all 5 PRs now green (2026-06-23)
The pre-existing self-service unit-test failure that kept vuer_oss #8001 red is RESOLVED, and #8001 is now fully green.
- A colleague merged the self-service test fix to vuer_oss
develin PR #8003 (commitcfdc116543, “tests updates/ci fix” — touchesself-service-room-archive-service.test.js). - Merged
origin/develinto the depcheck branchchore/FKITDEV-8239-depcheck-ci— clean merge, no conflicts.develonly changedCODEOWNERS+ the test file; zero overlap with the 3 CI-config files this branch touches. Merge commit3717e30b91, solo-author (andras.lederer), pushed. - #8001 re-ran and is now fully green: Unit Tests, SonarQube Scan, SonarCloud Code Analysis, Build, Lint, Audit, Unused Dependencies (depcheck) all pass.
All 5 FKITDEV-8239 PRs are now fully green and ready to merge
vuer_oss #8001, vuer_css #3076, portal_css #703, esign_oss #353, esign_css #253 — all green, all ready to merge.
State
For Agents
- Branch:
chore/FKITDEV-8239-depcheck-ci(based onorigin/devel) in each repo, pushed togit@github.com:TechTeamer/<repo>- Worktrees:
<repo>-FKITDEV-8239sibling dirs in the facekom working directory — preserved for PR iteration- Committed: YES (solo-author
andras.lederer <andras.lederer@alpiq.com>, no Co-Authored-By,--no-verify). Pushed: YES (2026-06-23). PRs: OPEN — vuer_oss #8001, vuer_css #3076, portal_css #703, esign_oss #353, esign_css #253.- depcheck commits: vuer_oss
0e7bd6377e, vuer_css7913f181c, portal_cssac15b91d, esign_oss47d6a5c, esign_css93ccd9f- SonarCloud-fix commits (
.github/**→sonar.exclusions): vuer_ossc2b5cfcb3f, vuer_css93c9d976e, portal_css7ee62cbd, esign_oss4e96053, esign_css9f9b862- vuer_oss devel-merge commit (unblocks #8001):
3717e30b91(solo-author, clean merge oforigin/devel, no conflicts).- CI status: ALL 5 PRs fully green and ready to merge (vuer_oss #8001, vuer_css #3076, portal_css #703, esign_oss #353, esign_css #253). The pre-existing self-service-room-archive unit-test failure that kept #8001 red is RESOLVED — colleague’s vuer_oss
develPR #8003 (commitcfdc116543) fixed the test; merged into this branch (3717e30b91) and #8001 re-ran green.- Reusable gotcha for the SonarCloud GHA supply-chain gate: SonarCloud “Security Rating on New Code” can fail on new CI workflow lines
- Affects: vuer_oss, vuer_css, portal_css, esign_oss, esign_css
Related
- portal_css
- vuer_oss
- vuer_css
- esign_oss
- esign_css
- FaceKom
- ci-github-branch-audit-chronically-red — CI-gate gotchas, incl. the SonarCloud GHA supply-chain gate hit on this ticket
- FKITDEV-8887 — reusable tokenless SonarCloud check-run-annotation read technique (used to read the per-PR findings here)
- FKITDEV-8787 — self-service work; likely origin of the pre-existing self-service-room-archive unit-test failure that briefly kept vuer_oss #8001 red (now RESOLVED via vuer_oss devel PR #8003, commit
cfdc116543)