Skip to content

WIP Libsch1 20 maintenance and security#1210

Open
Janell-Huyck wants to merge 8 commits into
developfrom
LIBSCH1-20-maintenance-and-security
Open

WIP Libsch1 20 maintenance and security#1210
Janell-Huyck wants to merge 8 commits into
developfrom
LIBSCH1-20-maintenance-and-security

Conversation

@Janell-Huyck
Copy link
Copy Markdown
Contributor

Summary

  • Updates local developer setup and troubleshooting docs in README.md for:
    • Yarn 4 + Corepack activation (corepack enable, corepack prepare ...)
    • explicit yarn install step
    • FITS installation and SCHOLAR_FITS_PATH local env configuration
    • ImageMagick (imagemagick@6) requirement and troubleshooting guidance
  • Improves FITS configuration in config/initializers/hyrax.rb:
    • uses SCHOLAR_FITS_PATH when provided
    • only selects fallback FITS paths if the file actually exists
    • avoids assigning a non-existent fits.sh path
  • Cleans up .bundler-audit.yml:
    • removes obsolete ignored advisories that are now covered by updated locked gem versions
    • updates advisory comments to current versions (e.g., faraday, nokogiri)
    • adds ignore entries for newly surfaced ActiveStorage advisory (CVE-2026-33658 / GHSA-p9fm-f462-ggrg)
  • Adds Yarn 4 project metadata/config (package.json, yarn.lock, .yarnrc.yml, .yarn/install-state.gz) and ignores node_modules/ in .gitignore.
  • Refreshes Gemfile.lock dependency resolution.

Why

  • Developers were blocked by missing FITS/ImageMagick tooling and unclear setup instructions.
  • Yarn 4 migration required explicit Corepack guidance to avoid install/runtime confusion.
  • FITS path fallback logic could resolve to fits.sh even when unavailable, causing runtime upload failures.
  • Bundler-audit ignore list had stale entries after dependency updates, making security tracking noisy.

Notes

  • This PR updates setup/documentation plus dependency/tooling metadata; behavior changes are limited to safer FITS path resolution.
  • Existing unresolved advisories tied to the Rails 5.2 stack remain intentionally ignored in .bundler-audit.yml.

Document Yarn 4/Corepack, FITS, and ImageMagick setup and troubleshooting, and make Hyrax file characterization honor SCHOLAR_FITS_PATH for reliable local uploads.
Capture the updated Ruby gem lockfile and Yarn 4 project metadata/lockfile so the repository reflects the current local dependency toolchain state.
Prevent local Yarn dependency installs from appearing as untracked files in the repository.
Avoid assigning a non-existent fits.sh path by requiring a real file match, and prune obsolete ignored advisories while adding the new ActiveStorage advisory entry.
@Janell-Huyck Janell-Huyck changed the title Libsch1 20 maintenance and security WIP Libsch1 20 maintenance and security May 7, 2026
Override hyrax/app.js.erb to unwrap ES module default exports before
constructor calls (e.g. PermissionsControl), preventing startup errors
that left batch actions and modals non-interactive.

Remove duplicate jquery_ujs require from application.js manifest.
Yarn regenerates install-state.gz locally; committing it caused noisy diffs.
Remove the tracked file and add it to .gitignore.
Blacklight.activate runs each onLoad callback sequentially. When
Hyrax.initialize threw (wrong ES module default for collections_utils,
FileManager on pages without #sortable, or CollectionTypes before the
empty-wrapper check), hyrax/collections.js never registered delete-modal
handlers and select-work initialization could be skipped.

- Override collections_v2.es6 and collection_types.es6 to unwrap
  collections_utils default export and skip CollectionTypes work when
  .collection-types-wrapper is absent.
- Guard fileManager, adminSetEditor, and collectionEditor in app.js.erb
  when required DOM is missing.
- Fix collection type delete confirm AJAX to use jqXHR .done (gem used a
  non-standard done: option that jQuery ignores).
Blacklight.activate runs registered callbacks sequentially without error
isolation. An uncaught exception in Hyrax.initialize prevented later
scripts (including hyrax/tabs.js) from running, leaving Bootstrap work
form tabs inactive so Capybara saw DOI content as non-visible.

Wrap the full initialize body in try/catch and isolate FileManager
construction so partial markup or affix errors cannot abort the rest of
the activation chain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant