一些issue修改

This commit is contained in:
付民康
2025-03-26 17:52:03 +08:00
parent 0a81c46e35
commit eb55e0171f
5 changed files with 99 additions and 74 deletions

View File

@@ -7,9 +7,10 @@
</div>
<div>
<br />通过AI技术精准诊断漏洞类型智能匹配多维度定制化修复策略实现从数据校验代码加固到权限控制的全链路防御助力漏洞修复效率提升全方位保障开源软件使用安全<br />
<!-- <ul>
<li v-for="info in infoList">{{ info }}</li>
</ul> -->
<!-- <ul>-->
<!-- <li v-for="info in infoList">{{ info }}</li>-->
<!-- </ul>-->
</div>
</div>
</div>
@@ -25,7 +26,7 @@
<div style="width: 100%; padding: 20px 20px 0px 0">
<div class="ai-panel-header-title">
<div>
<d-tag color="red-w98" class="mr-1" size="sm">{{ '严重' }}</d-tag>
<d-tag color="red-w98" class="mr-1" size="sm">严重</d-tag>
<span>{{ rowItem.libraryName || '--' }}</span>
</div>
<div
@@ -45,9 +46,7 @@
<span class="weak-text">修复兼容性</span>
<span>{{ rowItem.vulnerabilities.length || '--' }}</span>
<img src="@/assets/imgs/jyh/help.png" class="icon-sm" />
<d-tag class="ml-1" type="warning" size="sm">{{
rowItem.vulnerabilities.length > 0 ? rowItem.vulnerabilities[0].severity : '--'
}}</d-tag>
<d-tag class="ml-1" type="warning" size="sm"></d-tag>
</div>
<div>
<span class="weak-text">升级版本</span>
@@ -76,12 +75,12 @@
</template>
<script setup>
import { ref, onMounted, defineProps } from 'vue';
import { defineProps, onMounted, ref } from 'vue';
import Panel from '@/components/AIRepair/Panel.vue';
import Table from '@/components/AIRepair/Table.vue';
import NoData from '@/components/NoData/NoData.vue';
import { getRepairInfo } from '@/api/jyh';
const propsData = defineProps(['versionId']);
import { getVulnList, remediationSearchRemediations } from '@/api/jyh';
const infoList = ref([
'当前代码主要风险为易受常见的注入攻击包括命令注入、SQL注入、表达式注入针对每种攻击应提供相应的防范措施如数据校验、使用安全函数和限制程序权限。',
'相对上一次检查【提升点】在于代码基础编码问题少了47.8%问题总数降低29.3%'
@@ -98,7 +97,11 @@ const tableConfig = ref([
field: 'vulnType',
header: '安全问题类型',
sortable: false,
sortMethod: null
sortMethod: null,
format: (val) => {
// val小写转大写
return (val || '').toUpperCase();
}
},
{
field: 'vulnId',
@@ -114,64 +117,63 @@ const tableConfig = ref([
}
]);
const list = ref([
{
expand: true,
title: 'Morgan',
data: {
listData: [
{
securityProblemCode: '1',
type: '安全问题',
CWEcode: 'CWE-123',
score: 70
},
{
securityProblemCode: '2',
type: '安全问题',
CWEcode: 'MIT-LICENSE',
score: 89
}
]
}
},
{
expand: true,
title: 'webpack',
data: {
listData: [
{
securityProblemCode: '1',
type: '安全问题',
CWEcode: 'CWE-123',
score: 100
},
{
securityProblemCode: '2',
type: '安全问题',
CWEcode: 'MIT-LICENSE',
score: 90
}
]
}
}
]);
const propsData = defineProps(['versionId']);
const getInfo = async () => {
const { data } = await getRepairInfo({
const fetchVulnList = async () => {
const { data } = await remediationSearchRemediations({
// softwareId: 47,
softwareId: propsData.versionId,
current: 1,
size: 10,
// "softwareId": 47,
softwareId: propsData.versionId
size: 10
// componentId: '',
});
if (data.code === 200) {
tableData.value = data?.data?.components || [];
if (data.data.code === 200) {
tableData.value = data?.data?.data?.components || [];
// pager.value.total = data?.data?.data?.total || [];
}
};
const tableData = ref([]);
const tableData = ref([
// {
// "componentId": 1,
// "libraryName": "Spring Framework",
// "currentVersion": "5.3.26",
// "vulnerabilities": [
// {
// "vulnId": "CVE-2024-12345",
// "severity": "High",
// "vulnType": "Remote Code Execution",
// "cvssScore": 8.5,
// "remediation": {
// "recommendedFix": "Upgrade to version 5.3.27 or later.",
// "patchLink": "https://spring.io/security/advisory/CVE-2024-12345",
// "recommendedVersion": "5.3.27"
// }
// }
// ]
// },
// {
// "componentId": 2,
// "libraryName": "Log4j",
// "currentVersion": "2.14.0",
// "vulnerabilities": [
// {
// "vulnId": "CVE-2023-67890",
// "severity": "Critical",
// "vulnType": "Information Disclosure",
// "cvssScore": 9.8,
// "remediation": {
// "recommendedFix": "Apply security patch 2.14.1.",
// "patchLink": "https://logging.apache.org/log4j/2.x/security.html",
// "recommendedVersion": "2.14.1"
// }
// }
// ]
// }
]);
onMounted(() => {
getInfo();
fetchVulnList();
});
</script>
@@ -239,13 +241,13 @@ onMounted(() => {
padding: 1px;
border-radius: 8px;
background-image: linear-gradient(
134.79deg,
#a4f7df 0%,
#a0cefb 21%,
#5f9afe 43%,
#d9b9fc 62%,
#01efbb 73%,
#fbae46 100%
134.79deg,
#a4f7df 0%,
#a0cefb 21%,
#5f9afe 43%,
#d9b9fc 62%,
#01efbb 73%,
#fbae46 100%
);
}