-
Notifications
You must be signed in to change notification settings - Fork 1
Modernize dashboard dependencies and build workflows #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: npm | ||
| directory: /dashboard | ||
| schedule: | ||
| interval: monthly | ||
| groups: | ||
| react: | ||
| patterns: [react, react-dom, '@types/react*'] | ||
| material-ui: | ||
| patterns: ['@mui/*', '@emotion/*'] | ||
| tooling: | ||
| dependency-type: development | ||
| exclude-patterns: ['@types/react*'] | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: monthly | ||
| groups: | ||
| actions: | ||
| patterns: ['*'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Dashboard CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'dashboard/**' | ||
| - '.github/workflows/**' | ||
| push: | ||
| branches: [main, streamlit] | ||
| paths: | ||
| - 'dashboard/**' | ||
| - '.github/workflows/**' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: dashboard-ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| checks: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| defaults: | ||
| run: | ||
| working-directory: dashboard | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version-file: dashboard/.nvmrc | ||
| cache: npm | ||
| cache-dependency-path: dashboard/package-lock.json | ||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version-file: dashboard/.python-version | ||
| cache: pip | ||
| cache-dependency-path: dashboard/requirements-deploy.txt | ||
| - run: python -m pip install --require-hashes -r requirements-deploy.txt | ||
| - run: python -m unittest discover -s tests -p 'test_*.py' | ||
| - run: npm ci | ||
| - run: npm run check | ||
| - name: Prepare build fixtures (no MinIO credentials) | ||
| run: node scripts/prepare-ci-data.mjs | ||
| - name: Build for GitHub Pages | ||
| env: | ||
| BASE_PATH: /slcomp/ | ||
| run: npm run build | ||
| - name: Verify build artifacts | ||
| run: node scripts/check-build.mjs | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,30 @@ | ||
| export default [ | ||
| import js from '@eslint/js'; | ||
| import { defineConfig, globalIgnores } from 'eslint/config'; | ||
| import globals from 'globals'; | ||
| import tseslint from 'typescript-eslint'; | ||
| import reactHooks from 'eslint-plugin-react-hooks'; | ||
| import reactRefresh from 'eslint-plugin-react-refresh'; | ||
|
|
||
| export default defineConfig([ | ||
| globalIgnores(['dist/**', 'node_modules/**', 'public/**', '.cache/**']), | ||
| { | ||
| ignores: ['dist/', 'node_modules/', '*.config.js'], | ||
| files: ['**/*.{js,mjs}'], | ||
| extends: [js.configs.recommended], | ||
| languageOptions: { globals: { ...globals.node, ...globals.browser } }, | ||
| }, | ||
| { | ||
| files: ['src/**/*.{ts,tsx}', 'vite.config.ts'], | ||
| extends: [js.configs.recommended, tseslint.configs.recommended], | ||
| languageOptions: { globals: { ...globals.browser, ...globals.node } }, | ||
| rules: { '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }] }, | ||
| }, | ||
| { | ||
| files: ['src/**/*.{ts,tsx}'], | ||
| languageOptions: { | ||
| ecmaVersion: 'latest', | ||
| sourceType: 'module', | ||
| parser: await import('@typescript-eslint/parser').then(m => m.default), | ||
| parserOptions: { | ||
| ecmaFeatures: { jsx: true }, | ||
| }, | ||
| }, | ||
| plugins: { | ||
| '@typescript-eslint': await import('@typescript-eslint/eslint-plugin').then(m => m.default), | ||
| 'react-hooks': await import('eslint-plugin-react-hooks').then(m => m.default), | ||
| 'react-refresh': await import('eslint-plugin-react-refresh').then(m => m.default), | ||
| }, | ||
| plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh }, | ||
| rules: { | ||
| '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | ||
| '@typescript-eslint/no-explicit-any': 'warn', | ||
| 'react-hooks/rules-of-hooks': 'error', | ||
| 'react-hooks/exhaustive-deps': 'warn', | ||
| 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], | ||
| 'react-hooks/exhaustive-deps': 'error', | ||
| 'react-refresh/only-export-components': ['error', { allowConstantExport: true }], | ||
| }, | ||
| }, | ||
| ]; | ||
| ]); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🛡️ Detected with Advanced Tier | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: CosmoObs/slcomp
Length of output: 4335
🏁 Script executed:
Repository: CosmoObs/slcomp
Length of output: 14995
🏁 Script executed:
Repository: CosmoObs/slcomp
Length of output: 13700
Sensitive Data Exposure
Reachability: External
Exploitability: Moderate
CWE: CWE-522 — Insufficiently Protected Credentials
Disable persisted checkout credentials in the new pull-request CI job.
actions/checkoutpersistsGITHUB_TOKENby default and enables later scripts to run authenticated Git commands. The new dashboard CI workflow runs pull-request code, dependencies, and build scripts after checkout with acontents: readtoken. This creates a real but read-only credential exposure.The deployment occurrence is not introduced by this PR. The merge-base workflow already used
actions/checkout@v4, and that job runs only onmainorstreamlit. No explicit later workflow step requires authenticated Git.Disable checkout credential persistence for dashboard CI
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.30.1)
[warning] 30-30: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
View in Security blast radius
🤖 Prompt for AI Agents