-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,256 additions
and
4,623 deletions.
There are no files selected for viewing
This file contains 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 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,95 @@ | ||
name: CI Security Pipeline | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
pull_request: | ||
branches: [develop] | ||
|
||
jobs: | ||
security-checks: | ||
name: Security Checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x, 22.x] | ||
fail-fast: false | ||
|
||
permissions: | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js ${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Run Tests | ||
run: npm run test | ||
|
||
- name: OWASP Dependency Check | ||
id: dependency-check | ||
continue-on-error: true | ||
uses: dependency-check/Dependency-Check_Action@main | ||
with: | ||
project: "HyVueGantt" | ||
path: "." | ||
format: "HTML" | ||
args: > | ||
--failOnCVSS 7 | ||
--enableRetired | ||
- name: Run Syft | ||
uses: anchore/[email protected] | ||
with: | ||
format: spdx-json | ||
file: package-lock.json | ||
artifact-name: sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json | ||
output-file: sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json | ||
|
||
- name: Run Grype | ||
uses: anchore/[email protected] | ||
continue-on-error: true | ||
with: | ||
sbom: sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json | ||
fail-build: true | ||
severity-cutoff: "high" | ||
output-format: json | ||
output-file: grype-results.json | ||
|
||
- name: Archive Security Results | ||
uses: actions/[email protected] | ||
if: always() | ||
with: | ||
name: security-scan-results-node-${{ matrix.node-version }} | ||
path: | | ||
dependency-check-report.html | ||
sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json | ||
${{github.workspace}}/reports | ||
grype-results.json | ||
retention-days: 2 | ||
|
||
#- name: Notify on Failure | ||
# if: failure() | ||
# uses: actions/github-script@v7 | ||
# with: | ||
# script: | | ||
# const nodeVersion = '${{ matrix.node }}'; | ||
# github.rest.issues.create({ | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# title: `Security Scan Failed - Node ${nodeVersion}`, | ||
# body: `Security scan failed for Node.js ${nodeVersion} in workflow run: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`, | ||
# labels: ['security', 'ci-failure'] | ||
# }) |
This file contains 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 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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,142 @@ | ||
<script setup lang="ts"> | ||
import { ref, onMounted, computed } from 'vue' | ||
import { GGanttChart, GGanttRow } from 'hy-vue-gantt' | ||
const isLibraryReady = ref(false) | ||
const chartConfig = { | ||
chartStart: '2024-12-15', | ||
chartEnd: '2025-01-15', | ||
precision: 'hour', | ||
barStart: 'start', | ||
barEnd: 'end', | ||
colorScheme: 'vue', | ||
grid: true | ||
} | ||
const enableWeekends = ref(true) | ||
const enableHolidays = ref('US') | ||
const enableBusinessHours = ref(true) | ||
const highlightedDaysInWeek = computed(() => | ||
enableWeekends.value ? [0, 6] : [] | ||
) | ||
const highlightedHours = computed(() => | ||
enableBusinessHours.value ? [9, 10, 11, 12, 13, 14, 15, 16, 17] : [] | ||
) | ||
const rows = ref([ | ||
{ | ||
label: 'Year End Activities', | ||
bars: [ | ||
{ | ||
ganttBarConfig: { | ||
id: 'task1', | ||
label: 'Planning', | ||
style: { background: '#42b883' } | ||
}, | ||
start: '2024-12-16 00:00', | ||
end: '2024-12-20 23:59' | ||
}, | ||
{ | ||
ganttBarConfig: { | ||
id: 'task2', | ||
label: 'Implementation', | ||
style: { background: '#35495e' } | ||
}, | ||
start: '2024-12-27', | ||
end: '2025-01-03' | ||
}, | ||
{ | ||
ganttBarConfig: { | ||
id: 'task3', | ||
label: 'Review', | ||
style: { background: '#ff7e67' } | ||
}, | ||
start: '2025-01-06', | ||
end: '2025-01-10' | ||
} | ||
] | ||
} | ||
]) | ||
onMounted(() => { | ||
isLibraryReady.value = true | ||
}) | ||
</script> | ||
|
||
<template> | ||
<ClientOnly> | ||
<div class="demo-container" v-if="isLibraryReady"> | ||
<div class="controls"> | ||
<label class="control-item"> | ||
<input type="checkbox" v-model="enableWeekends"> | ||
Highlight Weekends | ||
</label> | ||
|
||
<label class="control-item"> | ||
<select v-model="enableHolidays"> | ||
<option value="">No Holidays</option> | ||
<option value="US">US Holidays</option> | ||
<option value="GB">UK Holidays</option> | ||
<option value="IT">Italian Holidays</option> | ||
</select> | ||
</label> | ||
|
||
<label class="control-item"> | ||
<input type="checkbox" v-model="enableBusinessHours"> | ||
Highlight Business Hours | ||
</label> | ||
</div> | ||
|
||
<g-gantt-chart | ||
v-bind="chartConfig" | ||
:highlighted-days-in-week="highlightedDaysInWeek" | ||
:highlighted-hours="highlightedHours" | ||
:holiday-highlight="enableHolidays" | ||
> | ||
<g-gantt-row | ||
v-for="row in rows" | ||
:key="row.label" | ||
:label="row.label" | ||
:bars="row.bars" | ||
:highlight-on-hover="true" | ||
/> | ||
</g-gantt-chart> | ||
</div> | ||
</ClientOnly> | ||
</template> | ||
|
||
<style scoped> | ||
.demo-container { | ||
border: 1px solid #eaeaea; | ||
border-radius: 8px; | ||
padding: 20px; | ||
margin: 20px 0; | ||
} | ||
.controls { | ||
margin-bottom: 20px; | ||
display: flex; | ||
gap: 20px; | ||
align-items: center; | ||
} | ||
.control-item { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
} | ||
.control-item select { | ||
padding: 4px 8px; | ||
border-radius: 4px; | ||
border: 1px solid #eaeaea; | ||
} | ||
.control-item input[type="checkbox"] { | ||
width: 16px; | ||
height: 16px; | ||
} | ||
</style> |
This file contains 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
Oops, something went wrong.