Merge remote-tracking branch 'origin/master'
# Conflicts: # src/api/jyh/index.ts
This commit is contained in:
@@ -136,6 +136,28 @@ export function getVulnerabilityList() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取漏洞数据
|
||||||
|
export const getVulnList = (data): Promise<any> => {
|
||||||
|
return reqCatchV2(() =>
|
||||||
|
request({
|
||||||
|
url: `/api/v1/repo/vulnerability/page`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取漏洞数据
|
||||||
|
export const getVulnDetail = (data): Promise<any> => {
|
||||||
|
return reqCatchV2(() =>
|
||||||
|
request({
|
||||||
|
url: `/api/v1/repo/vulnerability/info`,
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 迁移批量导入
|
// 迁移批量导入
|
||||||
export function repoImport(data: types.commonRepoReqType){
|
export function repoImport(data: types.commonRepoReqType){
|
||||||
return reqCatchV2(() =>
|
return reqCatchV2(() =>
|
||||||
|
|||||||
@@ -1543,13 +1543,3 @@ export const getOriginalComment = (params: types.DiscussionCommentProps): Promis
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取漏洞数据
|
|
||||||
export const getVulnDetail = (params: types.VulnDetailProps): Promise<any> => {
|
|
||||||
return reqCatch(() =>
|
|
||||||
request({
|
|
||||||
url: `/api/v1/repo/vulnerability/info`,
|
|
||||||
method: 'get',
|
|
||||||
params,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
<!-- 漏洞详情 -->
|
<!-- 漏洞详情 -->
|
||||||
<d-drawer v-model="vulnDetailVisable" style="width: auto;">
|
<d-drawer v-model="vulnDetailVisable" style="width: auto;">
|
||||||
<VulnerabilityDetail :vulnId="currentVuln.id" :vulnInfo="currentVuln"></VulnerabilityDetail>
|
<VulnerabilityDetail :softwareId="currentVuln.softwareId" :vulnId="currentVuln.id"></VulnerabilityDetail>
|
||||||
</d-drawer>
|
</d-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -244,7 +244,14 @@ const vulnDetailVisable = ref(false);
|
|||||||
const currentVuln = ref();
|
const currentVuln = ref();
|
||||||
const openVulnDetail = (row) => {
|
const openVulnDetail = (row) => {
|
||||||
vulnDetailVisable.value = true;
|
vulnDetailVisable.value = true;
|
||||||
currentVuln.value = row;
|
if(row.softwareId && row.id) {
|
||||||
|
currentVuln.value = row;
|
||||||
|
} else {
|
||||||
|
currentVuln.value = {
|
||||||
|
softwareId: 47,
|
||||||
|
id: 72
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -82,27 +82,27 @@
|
|||||||
<d-row class="mb-3">
|
<d-row class="mb-3">
|
||||||
<d-col :span="12">
|
<d-col :span="12">
|
||||||
<span class="card-key width-90">组件名</span>
|
<span class="card-key width-90">组件名</span>
|
||||||
<span class="card-val">{{vulnDetail.compName || '--'}}</span>
|
<span class="card-val">{{componentInfo.moduleName || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
<d-col :span="12">
|
<d-col :span="12">
|
||||||
<span class="card-key width-90">深度</span>
|
<span class="card-key width-90">深度</span>
|
||||||
<span class="card-val">{{vulnDetail.complexity || '--'}}</span>
|
<span class="card-val">{{componentInfo.depth || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
</d-row>
|
</d-row>
|
||||||
<d-row class="mb-3">
|
<d-row class="mb-3">
|
||||||
<d-col :span="12">
|
<d-col :span="12">
|
||||||
<span class="card-key width-90">当前版本</span>
|
<span class="card-key width-90">当前版本</span>
|
||||||
<span class="card-val">{{vulnDetail.version || '--'}}</span>
|
<span class="card-val">{{componentInfo.currentVersion || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
<d-col :span="12">
|
<d-col :span="12">
|
||||||
<span class="card-key width-90">最新版本</span>
|
<span class="card-key width-90">最新版本</span>
|
||||||
<span class="card-val">{{vulnDetail.cnvdId || '--'}}</span>
|
<span class="card-val">{{componentInfo.latestVersion || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
</d-row>
|
</d-row>
|
||||||
<d-row>
|
<d-row>
|
||||||
<d-col :span="24">
|
<d-col :span="24">
|
||||||
<span class="card-key width-90">组件依赖关系</span>
|
<span class="card-key width-90">组件依赖关系</span>
|
||||||
<span class="card-val">{{vulnDetail.version || '--'}}</span>
|
<span class="card-val">{{componentInfo.version || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
</d-row>
|
</d-row>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -111,17 +111,17 @@
|
|||||||
<d-row class="mb-3">
|
<d-row class="mb-3">
|
||||||
<d-col :span="12">
|
<d-col :span="12">
|
||||||
<span class="card-key width-90">补丁版本</span>
|
<span class="card-key width-90">补丁版本</span>
|
||||||
<span class="card-val">{{vulnDetail.fixVersion || '--'}}</span>
|
<span class="card-val">{{remediationInfo.recommendedVersion || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
<d-col :span="12">
|
<d-col :span="12">
|
||||||
<span class="card-key width-90">修复兼容性</span>
|
<span class="card-key width-90">修复兼容性</span>
|
||||||
<span class="card-val">{{vulnDetail.complexity || '--'}}</span>
|
<span class="card-val">{{remediationInfo.compatibility || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
</d-row>
|
</d-row>
|
||||||
<d-row>
|
<d-row>
|
||||||
<d-col :span="24">
|
<d-col :span="24">
|
||||||
<span class="card-key width-90">修复建议</span>
|
<span class="card-key width-90">修复建议</span>
|
||||||
<span class="card-val">{{vulnDetail.fixIssue || '--'}}</span>
|
<span class="card-val">{{remediationInfo.recommendedFix || '--'}}</span>
|
||||||
</d-col>
|
</d-col>
|
||||||
</d-row>
|
</d-row>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -129,38 +129,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getVulnDetail } from '@/api/repo';
|
import { getVulnDetail } from '@/api/jyh';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const propsData = defineProps(['repoId', 'vulnId', 'vulnInfo']);
|
const propsData = defineProps(['softwareId', 'vulnId', 'vulnInfo']);
|
||||||
const vulnDetail = ref({
|
const vulnDetail = ref({});
|
||||||
vulnId: 'HWPSIRT-2022-29348',
|
const componentInfo = ref({});
|
||||||
cweId: 'CVE-2013-0293',
|
const remediationInfo = ref({})
|
||||||
cnvdId: 'CNVD-201105-215',
|
|
||||||
name: '',
|
|
||||||
code: '',
|
|
||||||
description: '攻击者通过特制的PUT请求执行任意SQL命令,可能导致数据库内容被操控。',
|
|
||||||
extraInfo: '腾讯云丁安全实验室发现并报告该漏洞。',
|
|
||||||
fixIssue: '使用参数化查询或预编译语句,避免SQL注入。',
|
|
||||||
attackVector: '',
|
|
||||||
attackComplexity: '',
|
|
||||||
userInteraction: '',
|
|
||||||
publishDate: '2018-07-31',
|
|
||||||
compName: 'mplayer',
|
|
||||||
fixVersion: '1.4',
|
|
||||||
"privilegesRequired": "None",
|
|
||||||
"exploitabilityScore": 9.8,
|
|
||||||
"impactScore": 10.0,
|
|
||||||
"cvssScore": 9.9,
|
|
||||||
"severity": "Critical",
|
|
||||||
});
|
|
||||||
|
|
||||||
const queryVulnDetail = async () => {
|
const queryVulnDetail = async () => {
|
||||||
const data = await getVulnDetail({repoId: propsData.repoId, id: propsData.vulnId});
|
const data = await getVulnDetail({softwareId: propsData.softwareId, id: propsData.vulnId});
|
||||||
vulnDetail.value = data;
|
if (data?.data?.data?.data) {
|
||||||
|
vulnDetail.value = data.data.data.data.vulnerabilityInfo;
|
||||||
|
componentInfo.value = data.data.data.data.componentInfo;
|
||||||
|
remediationInfo.value = data.data.data.data.remediationInfo;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
// queryVulnDetail();
|
queryVulnDetail();
|
||||||
// vulnDetail.value = propsData.vulnInfo;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user