Skip to content

#2259 feat: add modern dependency management and update frontend stru…#2260

Merged
robfrank merged 5 commits intomainfrom
feat/2259-studio-update
Jun 16, 2025
Merged

#2259 feat: add modern dependency management and update frontend stru…#2260
robfrank merged 5 commits intomainfrom
feat/2259-studio-update

Conversation

@robfrank
Copy link
Collaborator

This pull request introduces significant improvements to the dependency management, security auditing, and build processes for the ArcadeDB Studio frontend. Key changes include the addition of automated workflows for security checks, enhanced configuration files for dependency updates and reviews, and a comprehensive security audit script. These changes aim to streamline development, ensure compliance with security and licensing standards, and improve the overall stability of the project.

Dependency Management Enhancements:

  • .github/dependabot.yml: Added high-priority dependency update rules for the Studio frontend, including grouping updates by type (e.g., security-critical, UI libraries, build tools) and limiting major version updates for stability.
  • studio/package.json: Defined dependencies and devDependencies with updated versions, added scripts for auditing, building, and security checks, and specified minimum Node.js and npm versions.

Security Auditing Improvements:

Licensing and Dependency Review:

  • .github/dependency-review-config.yml: Configured dependency review rules to enforce security and licensing requirements, including allowed and denied licenses and package-specific rules.

Build Process Optimization:

  • studio/pom.xml: Integrated the Frontend Maven Plugin to manage Node.js and npm installations, dependency installations, security audits, and webpack builds as part of the Maven lifecycle.

Miscellaneous Configuration Updates:

  • studio/.gitignore: Updated to exclude common dependency directories, build outputs, logs, and temporary files.
  • studio/.npmrc: Configured npm settings for security (audit-level=moderate) and performance (prefer-offline=true).
  • studio/.nvmrc: Specified Node.js version 18.19.0 for consistency across environments.…cture

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios

@robfrank robfrank added this to the 25.6.1 milestone Jun 14, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly overhauls the ArcadeDB Studio frontend's dependency management and build process. It transitions to a modern npm/Webpack-based approach, integrates this into the existing Maven build, and establishes robust automated security and license compliance checks via GitHub Actions and Dependency Review. The changes aim to streamline development workflows, enhance security posture, and ensure build consistency.

Highlights

  • Modernized Frontend Build: Introduced npm and Webpack for managing frontend dependencies and building assets in the studio module.
  • Maven Integration: Integrated the Node.js/npm installation, dependency management, security audit, and Webpack build steps into the Maven lifecycle using the frontend-maven-plugin.
  • Automated Dependency Updates: Configured Dependabot to automatically manage and group updates for Studio frontend dependencies, including specific rules for security-critical and build tools.
  • Enhanced Security Auditing: Added a new GitHub Actions workflow (studio-security-audit.yml) and a custom script (security-audit.sh) to automate vulnerability checks (npm audit), outdated package checks, and license compliance validation.
  • Dependency Review Configuration: Configured GitHub's Dependency Review action (dependency-review-config.yml) to enforce security policies (fail on moderate+ severity), define allowed/denied licenses, set minimum versions for critical packages, deny known malicious packages, and require review for significant changes.
  • Dependency Management Configuration: Added .npmrc and .nvmrc files to standardize npm behavior and Node.js version, and updated .gitignore to exclude frontend build artifacts and dependency directories.
  • Bootstrap 5 Update & Compatibility: Updated Bootstrap to version 5 and included compatibility shims in index.html for data attributes (data-toggle to data-bs-toggle, data-dismiss to data-bs-dismiss) and replaced bootstrap-notify with notyf for notifications.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configureGemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@@ -0,0 +1,78 @@
{

Check warning

Code scanning / Meterian

[security] jquery@3.7.1 is vulnerable (MET-4298919f0a13) Warning

This file introduces jquery@3.7.1 which is vulnerable (MET-4298919f0a13)
@@ -0,0 +1,78 @@
{

Check notice

Code scanning / Meterian

[stability] codemirror@5.65.19 is outdated Low

This file introduces codemirror@5.65.19 which is outdated
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modernizes the ArcadeDB Studio frontend by introducing robust dependency management with npm, a comprehensive security auditing process, and integration into the Maven build lifecycle. Key additions include dependabot.yml for automated dependency updates, dependency-review-config.yml for security and license compliance, a detailed security-audit.sh script, and a webpack.config.js to manage frontend assets. The changes also update index.html to use these npm-managed dependencies and include compatibility shims for Bootstrap 5. Overall, these are excellent improvements for maintainability, security, and the development workflow. A few minor configuration conflicts and script details have been highlighted for potential refinement.

"security-audit": "./scripts/security-audit.sh",
"build": "webpack --mode=production",
"dev": "webpack --mode=development --watch",
"clean": "rm -rf dist node_modules",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The clean script uses rm -rf dist node_modules. The webpack.config.js outputs to src/main/resources/static/dist, and the pom.xml already handles cleaning node_modules and this webpack output directory. If the dist directory at the root of studio/ is no longer used, this part of the script might be unnecessary. Consider clarifying its purpose or removing the dist part if it's obsolete.

    "clean": "rimraf src/main/resources/static/dist node_modules",

"clean": "rm -rf dist node_modules",
"precommit": "npm run security-check && npm run build",
"prepare": "npm run security-check",
"version": "npm run security-check && npm run build && git add ."
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The version script uses git add .. It's generally safer to explicitly add only the files that should be part of the version commit, such as package.json and package-lock.json. This prevents accidental inclusion of unrelated files.

    "version": "npm run security-check && npm run build && git add package.json package-lock.json"

if npm list license-checker &> /dev/null; then
npx license-checker --summary
else
echo "ℹ️ Install license-checker for license analysis: npm install -g license-checker"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The script suggests npm install -g license-checker if license-checker is not found. For better project encapsulation, it's recommended to add license-checker as a devDependency in package.json and then run it using npx license-checker.

Suggested change
echo "ℹ️ Install license-checker for license analysis: npm install -g license-checker"
npm install -D license-checker

@codacy-production
Copy link

codacy-production bot commented Jun 14, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.24%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6f55b42) 70247 44929 63.96%
Head commit (a5fbe09) 70247 (+0) 45101 (+172) 64.20% (+0.24%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2260) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@@ -0,0 +1,78 @@
{

Check warning

Code scanning / Meterian

[security] sweetalert2@11.22.0 is vulnerable (MET-5ce58a1dd896) Medium

This file introduces sweetalert2@11.22.4 which is vulnerable (MET-5ce58a1dd896)
@robfrank robfrank force-pushed the feat/2259-studio-update branch from 072e823 to c54c049 Compare June 15, 2025 08:12
@@ -0,0 +1,78 @@
{

Check notice

Code scanning / Meterian

[security] cytoscape-graphml@1.0.6 is vulnerable (MET-ef60ef67e0bf) Low

This file introduces cytoscape-graphml@1.0.6 which is vulnerable (MET-ef60ef67e0bf)
@robfrank robfrank force-pushed the feat/2259-studio-update branch from 2d83147 to a5fbe09 Compare June 16, 2025 12:10
@robfrank robfrank marked this pull request as ready for review June 16, 2025 20:43
@robfrank robfrank merged commit 425bfea into main Jun 16, 2025
16 of 21 checks passed
robfrank added a commit that referenced this pull request Jun 17, 2025
@robfrank robfrank deleted the feat/2259-studio-update branch June 20, 2025 07:45
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.

1 participant