Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into junjie_dev
# Conflicts: # src/views/Jyh/Search/Components/BatchVerify.vue
This commit is contained in:
@@ -40,7 +40,16 @@ const toolbarConfig = [
|
||||
['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'],
|
||||
];
|
||||
const mode = ref('readonly');
|
||||
warningData.value = JSON.parse(propsData.warningData.alertMsg ?? '{}');
|
||||
warningData.value = JSON.parse(propsData.warningData.alertMsg ?? JSON.stringify({
|
||||
subject: '【漏洞排查预警】ApacheIgnite远程代码执行漏洞排查(CVE-2024-52577)',
|
||||
importance: '高',
|
||||
group: '可信开源代码库运营团队',
|
||||
pulishTime: '2025-2-20',
|
||||
overview: `## 一、概要
|
||||
近日,安全中心发现Apache lgnite远程代码执行漏洞(CVE-2024-52577)。在 2.6.0<Apache Ignite< 2.17.0版本中,由于lgnite未能正确实施类序列化过滤器,攻击者能够利用恶意序列化对象绕过安全检查,从而在服务器端反序列化时触发任意代码的执行。经可信开源代码库运营团队评审漏洞技术定级2级/3级,若不满足利用条件可举证降为6级。请你按要求在XX时间内完成修复。
|
||||
## 二、修复方案
|
||||
升级Apache Ignite至安全版本:2.17.0`
|
||||
}));
|
||||
const confirm = () => {
|
||||
emit('close');
|
||||
};
|
||||
@@ -78,7 +87,7 @@ const handleModeChange = () => {
|
||||
}
|
||||
|
||||
.warning-text {
|
||||
padding: 20px;
|
||||
padding: 20px 20px 0;
|
||||
background: #F6F6F8;
|
||||
color: initial;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="mt-3">
|
||||
<div v-loading="searchOrganizationLoading" class="mt-3">
|
||||
<div v-if="hasOrganization">
|
||||
<d-card class="mb-[16px] bg-white" shadow="never">
|
||||
<div class="text-[14px] w-full flex items-center justify-between">
|
||||
@@ -36,19 +36,20 @@
|
||||
</div>
|
||||
<d-table
|
||||
:data="memberTableData"
|
||||
:show-loading="memberListSearchLoading"
|
||||
class="w-full mb-[20px] organ-table"
|
||||
:fix-header="memberTableData.length > 0"
|
||||
header-bg
|
||||
max-height="500px"
|
||||
>
|
||||
<d-column field="userName" header="成员名" />
|
||||
<d-column field="role" header="角色">
|
||||
<d-column field="username" header="成员名" />
|
||||
<d-column field="roleCode" header="角色">
|
||||
<template #default="{ row }">
|
||||
{{ memberRoleMap[row.role] ?? '' }}
|
||||
{{ memberRoleMap[row.roleCode] ?? '' }}
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="email" header="邮箱" />
|
||||
<d-column field="joinDate" header="加入时间" />
|
||||
<d-column field="createTime" header="加入时间" />
|
||||
<d-column header="操作">
|
||||
<template #default="{ row }">
|
||||
<d-button size="sm" variant="text" color="primary" class="p-0 justify-start" @click="openDeleteModal(row)">删除</d-button>
|
||||
@@ -66,6 +67,8 @@
|
||||
:can-view-total="true"
|
||||
:can-change-page-size="true"
|
||||
:max-items="5"
|
||||
@page-index-change="pagerIndexChange"
|
||||
@page-size-change="pagerSizeChange"
|
||||
/>
|
||||
</d-card>
|
||||
</div>
|
||||
@@ -89,7 +92,7 @@
|
||||
</d-form>
|
||||
|
||||
<div class="flex justify-center">
|
||||
<d-button variant="solid" class="mr-[8px]" @click="confirmCreateOrganizationBtnClick">确定</d-button>
|
||||
<d-button :loading="createOrganizationLoading" variant="solid" class="mr-[8px]" @click="confirmCreateOrganizationBtnClick">确定</d-button>
|
||||
<d-button @click="closeOrganizationModal">取消</d-button>
|
||||
</div>
|
||||
</d-modal>
|
||||
@@ -107,15 +110,15 @@
|
||||
</d-form>
|
||||
|
||||
<div class="flex justify-center">
|
||||
<d-button variant="solid" class="mr-[8px]" @click="inviteMemberConfirmBtnClick">确定</d-button>
|
||||
<d-button variant="solid" class="mr-[8px]" :loading="inviteMemberLoading" @click="inviteMemberConfirmBtnClick">确定</d-button>
|
||||
<d-button @click="closeInviteMemberModal">取消</d-button>
|
||||
</div>
|
||||
</d-modal>
|
||||
|
||||
<d-modal v-model="deleteMemberModalCtrl" title="删除成员" class="w-[600px]">
|
||||
<div class="mb-[20px]">即将删除成员‘{{ deleteRow.userName }}’,请确认是否继续?</div>
|
||||
<div class="mb-[20px]">即将删除成员‘{{ deleteRow.username }}’,请确认是否继续?</div>
|
||||
<div class="flex justify-center">
|
||||
<d-button variant="solid" class="mr-[8px]" @click="deleteMember">确定</d-button>
|
||||
<d-button variant="solid" class="mr-[8px]" :loading="deleteMemberLoading" @click="deleteMember">确定</d-button>
|
||||
<d-button @click="closeDeleteMemberModal">取消</d-button>
|
||||
</div>
|
||||
</d-modal>
|
||||
@@ -123,24 +126,38 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, shallowRef } from 'vue';
|
||||
import { Message } from 'vue-devui';
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import {
|
||||
createOrganizationApi,
|
||||
deleteOrganizationMemberApi,
|
||||
getOrganizationInfoApi,
|
||||
getOrganizationMemberListApi,
|
||||
inviteOrganizationMemberApi,
|
||||
updateOrganizationInfoApi
|
||||
} from '@/api/organizationManage/organizationManageApi';
|
||||
import {
|
||||
type OrganizationInfoType,
|
||||
type OrganizationMemberItemType
|
||||
type OrganizationMemberItemType,
|
||||
OrganizationMemberRoleEnum,
|
||||
type UserInfoType,
|
||||
} from '@/api/organizationManage/organizationManageType';
|
||||
import table from '@/components/AIRepair/Table.vue';
|
||||
import {getUserInfo} from "@/api/user";
|
||||
|
||||
const userInfo = shallowRef<UserInfoType>({
|
||||
username: '',
|
||||
mobile: null,
|
||||
email: '',
|
||||
avatar: '',
|
||||
noticeUnreadNum: 0,
|
||||
inviteNum: 0,
|
||||
groupId: null,
|
||||
groupName: null,
|
||||
groupDesc: null,
|
||||
});
|
||||
const searchOrganizationLoading = ref(false);
|
||||
const hasOrganization = ref(false);
|
||||
const organizationInfo = shallowRef<OrganizationInfoType>({
|
||||
groupId: 0,
|
||||
organizationName: '',
|
||||
organizationProfile: ''
|
||||
});
|
||||
@@ -158,6 +175,8 @@ const editLoading = ref(false);
|
||||
|
||||
const memberListSearchLoading = ref(false);
|
||||
const memberListSearchParam = ref('');
|
||||
let originMemberList: OrganizationMemberItemType[] = [];
|
||||
let filterMemberList: OrganizationMemberItemType[] = [];
|
||||
const memberTableData = shallowRef<OrganizationMemberItemType[]>([]);
|
||||
const pager = reactive({
|
||||
pageSize: 10,
|
||||
@@ -177,45 +196,40 @@ const inviteMemberFormData = reactive({
|
||||
role: ''
|
||||
});
|
||||
const inviteMemberSelectOptions = [
|
||||
{ name: '创建者', value: 'creator' },
|
||||
{ name: '成员', value: 'member' }
|
||||
{ name: '创建者', value: OrganizationMemberRoleEnum.OWNER },
|
||||
{ name: '成员', value: OrganizationMemberRoleEnum.MEMBER }
|
||||
];
|
||||
const memberRoleMap = {
|
||||
creator: '创建者',
|
||||
member: '成员'
|
||||
[OrganizationMemberRoleEnum.OWNER]: '创建者',
|
||||
[OrganizationMemberRoleEnum.MEMBER]: '成员'
|
||||
};
|
||||
|
||||
const mockTableData = [
|
||||
{ userName: '张三', role: 'member', email: '111@gmail.com', joinDate: '2090-02-30', id: '1' },
|
||||
{ userName: '李四', role: 'creator', email: '111@gmail.com', joinDate: '2090-02-30', id: '2' },
|
||||
{ userName: '王五', role: 'member', email: '111@gmail.com', joinDate: '2090-02-30', id: '3' },
|
||||
{ userName: '赵六', role: 'member', email: '111@gmail.com', joinDate: '2090-02-30', id: '4' },
|
||||
{ userName: '秦七', role: 'member', email: '111@gmail.com', joinDate: '2090-02-30', id: '5' }
|
||||
];
|
||||
|
||||
// -------------------- 获取组织信息 --------------------
|
||||
async function getOrganizationInfo() {
|
||||
const params = {
|
||||
organizationName: createFormData.organizationName,
|
||||
organizationProfile: createFormData.organizationProfile
|
||||
};
|
||||
searchOrganizationLoading.value = true;
|
||||
try {
|
||||
const res = await getOrganizationInfoApi(params);
|
||||
} catch (e) {}
|
||||
searchOrganizationLoading.value = false;
|
||||
getMemberList();
|
||||
// TODO 待接口定义好后删除下面两行固定赋值语句
|
||||
hasOrganization.value = true;
|
||||
organizationInfo.value = {
|
||||
organizationName: createFormData.organizationName,
|
||||
organizationProfile: createFormData.organizationProfile
|
||||
};
|
||||
init();
|
||||
function init() {
|
||||
queryUserInfo();
|
||||
}
|
||||
|
||||
// -------------------- 获取成员信息 --------------------
|
||||
async function getOrganizationMember(organizationId: string) {
|
||||
const params = {};
|
||||
// -------------------- 获取组织信息 --------------------
|
||||
async function queryUserInfo() {
|
||||
searchOrganizationLoading.value = true;
|
||||
try {
|
||||
const res = await getUserInfo();
|
||||
if (res.data?.data?.code === 200) {
|
||||
userInfo.value = res.data?.data.data;
|
||||
}
|
||||
if (userInfo.value.groupId) {
|
||||
hasOrganization.value = true;
|
||||
organizationInfo.value = {
|
||||
groupId: userInfo.value.groupId,
|
||||
organizationName: userInfo.value.groupName as string,
|
||||
organizationProfile: userInfo.value.groupDesc as string,
|
||||
};
|
||||
getMemberList();
|
||||
}
|
||||
} catch (e) {
|
||||
Message.error('查询用户信息失败');
|
||||
}
|
||||
searchOrganizationLoading.value = false;
|
||||
}
|
||||
|
||||
// -------------------- 创建组织 --------------------
|
||||
@@ -229,16 +243,21 @@ function confirmCreateOrganizationBtnClick() {
|
||||
|
||||
async function createOrganization() {
|
||||
const params = {
|
||||
organizationName: createFormData.organizationName,
|
||||
organizationProfile: createFormData.organizationProfile
|
||||
groupName: createFormData.organizationName,
|
||||
groupDesc: createFormData.organizationProfile
|
||||
};
|
||||
createOrganizationLoading.value = true;
|
||||
try {
|
||||
const res = await createOrganizationApi(params);
|
||||
} catch (e) {}
|
||||
closeOrganizationModal();
|
||||
// TODO 待接口定义好后删除下面调用逻辑
|
||||
getOrganizationInfo();
|
||||
if (res.data?.code !== 200) {
|
||||
Message.error(res.data?.msg || '创建失败');
|
||||
} else {
|
||||
closeOrganizationModal();
|
||||
queryUserInfo();
|
||||
}
|
||||
} catch (e) {
|
||||
Message.error('接口错误,创建失败');
|
||||
}
|
||||
createOrganizationLoading.value = false;
|
||||
}
|
||||
|
||||
@@ -247,31 +266,46 @@ function openCreateOrganizationModal() {
|
||||
}
|
||||
|
||||
function closeOrganizationModal() {
|
||||
createFormData.organizationName = '';
|
||||
createFormData.organizationProfile = '';
|
||||
createOrganizationModalCtrl.value = false;
|
||||
}
|
||||
|
||||
// -------------------- 编辑组织信息 --------------------
|
||||
function editIconClick() {
|
||||
createFormData.organizationName = organizationInfo.value.organizationName;
|
||||
createFormData.organizationProfile = organizationInfo.value.organizationProfile;
|
||||
isEdit.value = true;
|
||||
}
|
||||
|
||||
async function editOrganizationConfirm() {
|
||||
if (!createFormData.organizationName || !createFormData.organizationProfile) {
|
||||
Message.warning('组织名称和组织简介不能为空');
|
||||
return;
|
||||
}
|
||||
editLoading.value = true;
|
||||
const params = {
|
||||
organizationName: createFormData.organizationName,
|
||||
organizationProfile: createFormData.organizationProfile
|
||||
id: organizationInfo.value.groupId,
|
||||
name: createFormData.organizationName,
|
||||
desc: createFormData.organizationProfile
|
||||
};
|
||||
try {
|
||||
const res = await updateOrganizationInfoApi(params);
|
||||
} catch (e) {}
|
||||
if (res.data?.code === 200) {
|
||||
organizationInfo.value = {
|
||||
groupId: organizationInfo.value.groupId,
|
||||
...createFormData,
|
||||
};
|
||||
createFormData.organizationName = '';
|
||||
createFormData.organizationProfile = '';
|
||||
} else {
|
||||
Message.error(res.data?.msg || '更新失败');
|
||||
}
|
||||
} catch (e) {
|
||||
Message.error('接口错误,更新失败');
|
||||
}
|
||||
editLoading.value = false;
|
||||
isEdit.value = false;
|
||||
// TODO 待接口定义好后删除下面两行固定赋值语句
|
||||
hasOrganization.value = true;
|
||||
organizationInfo.value = {
|
||||
organizationName: createFormData.organizationName,
|
||||
organizationProfile: createFormData.organizationProfile
|
||||
};
|
||||
}
|
||||
|
||||
function editOrganizationCancel() {
|
||||
@@ -282,21 +316,41 @@ function editOrganizationCancel() {
|
||||
|
||||
// -------------------- 邀请、查询成员 --------------------
|
||||
async function getMemberList() {
|
||||
const params = {
|
||||
organizationName: createFormData.organizationName,
|
||||
pageIndex: pager.pageIndex,
|
||||
pageSize: pager.pageSize,
|
||||
searchParam: memberListSearchParam.value
|
||||
};
|
||||
memberListSearchLoading.value = true;
|
||||
try {
|
||||
const res = await getOrganizationMemberListApi(params);
|
||||
} catch (e) {}
|
||||
memberTableData.value = mockTableData;
|
||||
pager.total = 6;
|
||||
const res = await getOrganizationMemberListApi({ groupId: organizationInfo.value.groupId });
|
||||
if (res.data?.code === 200) {
|
||||
originMemberList = res.data?.data;
|
||||
updateFilterTableList();
|
||||
} else {
|
||||
Message.warning(res.data?.msg || '查询失败');
|
||||
}
|
||||
} catch (e) {
|
||||
Message.error('接口错误,查询失败');
|
||||
}
|
||||
memberListSearchLoading.value = false;
|
||||
}
|
||||
|
||||
function updateFilterTableList() {
|
||||
const queryStr = memberListSearchParam.value;
|
||||
filterMemberList = queryStr ? originMemberList.filter(item => item.username.includes(queryStr)) : originMemberList;
|
||||
updateCurrentPageTableList();
|
||||
}
|
||||
|
||||
function updateCurrentPageTableList() {
|
||||
const endIndex = pager.pageIndex * pager.pageSize;
|
||||
memberTableData.value = filterMemberList.slice(endIndex - pager.pageSize, endIndex);
|
||||
}
|
||||
|
||||
function pagerIndexChange() {
|
||||
updateCurrentPageTableList();
|
||||
}
|
||||
|
||||
function pagerSizeChange() {
|
||||
pager.pageIndex = 1;
|
||||
updateCurrentPageTableList();
|
||||
}
|
||||
|
||||
function openInviteMemberModal() {
|
||||
inviteMemberModalCtrl.value = true;
|
||||
}
|
||||
@@ -309,7 +363,6 @@ function openDeleteModal(row: any) {
|
||||
function inviteMemberConfirmBtnClick() {
|
||||
inviteMemberFormRef.value.validate((isValid: boolean) => {
|
||||
if (isValid) {
|
||||
console.log('aaaaaaaa');
|
||||
inviteMember();
|
||||
}
|
||||
});
|
||||
@@ -317,24 +370,24 @@ function inviteMemberConfirmBtnClick() {
|
||||
|
||||
async function inviteMember() {
|
||||
const params = {
|
||||
userName: inviteMemberFormData.userName,
|
||||
role: inviteMemberFormData.role
|
||||
groupId: organizationInfo.value.groupId,
|
||||
username: inviteMemberFormData.userName,
|
||||
roleCode: inviteMemberFormData.role
|
||||
};
|
||||
inviteMemberLoading.value = true;
|
||||
try {
|
||||
const res = await inviteOrganizationMemberApi(params);
|
||||
} catch (e) {}
|
||||
if (res.data?.data) {
|
||||
Message.success('邀请成功');
|
||||
getMemberList();
|
||||
} else {
|
||||
Message.warning(res.data?.msg || '邀请失败');
|
||||
}
|
||||
} catch (e) {
|
||||
Message.warning('接口错误,邀请失败');
|
||||
}
|
||||
inviteMemberLoading.value = false;
|
||||
closeInviteMemberModal();
|
||||
// TODO 待接口定义好后删除下面调用逻辑
|
||||
mockTableData.unshift({
|
||||
userName: inviteMemberFormData.userName,
|
||||
role: inviteMemberFormData.role,
|
||||
joinDate: new Date().toDateString(),
|
||||
id: String(pager.total++),
|
||||
email: `${inviteMemberFormData.userName}@gmail.com`
|
||||
});
|
||||
memberTableData.value = [...mockTableData];
|
||||
}
|
||||
|
||||
function closeInviteMemberModal() {
|
||||
@@ -343,19 +396,23 @@ function closeInviteMemberModal() {
|
||||
|
||||
async function deleteMember() {
|
||||
const params = {
|
||||
id: deleteRow.value.id
|
||||
groupId: organizationInfo.value.groupId,
|
||||
username: deleteRow.value.username
|
||||
};
|
||||
deleteMemberLoading.value = true;
|
||||
try {
|
||||
const res = await deleteOrganizationMemberApi(params);
|
||||
} catch (e) {}
|
||||
if (res.data?.data) {
|
||||
Message.success('删除成功');
|
||||
getMemberList();
|
||||
} else {
|
||||
Message.error(res.data?.msg || '删除失败');
|
||||
}
|
||||
} catch (e) {
|
||||
Message.warning('接口错误,删除失败');
|
||||
}
|
||||
deleteMemberLoading.value = false;
|
||||
closeDeleteMemberModal();
|
||||
// TODO 待接口定义好后删除下面调用逻辑
|
||||
const index = mockTableData.findIndex((item) => item.id === deleteRow.value.id);
|
||||
mockTableData.splice(index, 1);
|
||||
memberTableData.value = [...mockTableData];
|
||||
pager.total--;
|
||||
}
|
||||
|
||||
function closeDeleteMemberModal() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="BatchVerify">
|
||||
<div class="search-form">
|
||||
<FileUploadButton
|
||||
buttonText="导入"
|
||||
buttonText="批量导入"
|
||||
accept=".xml"
|
||||
:onFileUpload="handleFileUpload"
|
||||
/>
|
||||
@@ -20,13 +20,13 @@
|
||||
<div class="tjsj">
|
||||
<span style="height: 14px" class="split"></span>
|
||||
<span>可使用:</span>
|
||||
<span class="green" @click="filterVerifyResult(1)">3</span>
|
||||
<span style="height: 14px" class="split"></span>
|
||||
<span>未治理:</span>
|
||||
<span class="yellow" @click="filterVerifyResult(2)">3</span>
|
||||
<span class="green">3</span>
|
||||
<span style="height: 14px" class="split"></span>
|
||||
<span>有风险:</span>
|
||||
<span class="red" @click="filterVerifyResult(0)">3</span>
|
||||
<span class="red">3</span>
|
||||
<span style="height: 14px" class="split"></span>
|
||||
<span>未治理:</span>
|
||||
<span class="yellow">3</span>
|
||||
</div>
|
||||
<div class="left-btn">
|
||||
<a v-if="isLogin" class="cursor-pointer" href="/static/template.xlsx" download><i class="icon icon-download-2"></i>下载excel模板</a>
|
||||
@@ -72,8 +72,11 @@
|
||||
<template v-else-if="column.key === 'versionName'">
|
||||
<a>{{ scope.row.versionName }}</a>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'version'">
|
||||
<a @click="gotoDetail(scope.row)">{{ scope.row.version }}</a>
|
||||
<template v-else-if="column.key === 'softwareName'">
|
||||
<a @click="gotoDetail(scope.row)">{{ scope.row.softwareName }}</a>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'softwareVersion'">
|
||||
<a @click="gotoDetail(scope.row)">{{ scope.row.softwareVersion }}</a>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'versionCode'">
|
||||
<a @click="gotoDetail(scope.row)">{{ scope.row.versionCode }}</a>
|
||||
@@ -98,6 +101,7 @@
|
||||
</d-column>
|
||||
</template>
|
||||
<d-column header="操作" width="200" fixed-right="0px">
|
||||
<!--TODO:申请入口只有校验不通过的才显示-->
|
||||
<template #default="scope">
|
||||
<d-button
|
||||
variant="text"
|
||||
@@ -132,7 +136,7 @@
|
||||
<script setup lang="ts">
|
||||
import SettingTitle from '@/components/Setting/SettingTitle/index.vue';
|
||||
import SettingText from '@/components/Setting/SettingText/index.vue';
|
||||
import { ref,reactive } from 'vue';
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { getGroupClaList, setGroupClaStatus, deleteGroupCla } from '@/api/cla';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { GModal } from '@/components/Setting/index';
|
||||
@@ -143,6 +147,7 @@ import { useAccountStore } from '@/stores/user';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import TableSetting from '@/components/TableSetting/index.vue';
|
||||
import FileUploadButton from '@/components/FileUploadButton/index.vue';
|
||||
import { releasePage } from '@/api/jyh';
|
||||
|
||||
// 处理文件上传
|
||||
const handleFileUpload = async (file) => {
|
||||
@@ -156,43 +161,21 @@ const handleFileUpload = async (file) => {
|
||||
}, 2000); // 模拟 2 秒上传时间
|
||||
});
|
||||
};
|
||||
const currentReusltFilter = ref(null);
|
||||
const userInfo = useAccountStore();
|
||||
const { isLogin } = storeToRefs(userInfo);
|
||||
|
||||
const { namespace } = getOrgInfo();
|
||||
|
||||
const allTableData = ref([
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:0,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:0,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:0,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:2,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:2,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
{result:1,tjsj: '可使用', versionName:'CleanSource V8.0', name:'eslint-plugin-import',code: '05811AFV',version: '2.29.0',versionCode: '0583423820',smStatus: '同主软件(GA)',type:'依赖软件',license:'Apache License V2.0',risk:'中',useType:'软件',status:'未开始',url:'https://example17.com/security_updates_page',key:'',created:'2025-03-10 17:25:19',updated:'2025-03-10 17:25:19'},
|
||||
])
|
||||
|
||||
const tableData = ref([...allTableData.value]);
|
||||
const tableData = ref([]);
|
||||
const columns = ref([
|
||||
{ key: 'result', label: '校验结果', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'versionName', label: '选取版本火车名称', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'name', label: '软件名称', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'code', label: '软件编码', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'version', label: '软件版本', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'versionCode', label: '版本编码', visible: true, filterable: true, sortable: true },
|
||||
{ key: 'smStatus', label: '生命周期状态', visible: true, filterable: true, sortable: true },
|
||||
{ key: 'type', label: '主/依赖软件类型', visible: true, filterable: false, sortable: false },
|
||||
{ key: 'license', label: 'License名称', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'url', label: '官网漏洞披露地址', visible: true, filterable: false, sortable: false },
|
||||
{ key: 'risk', label: '集成风险', visible: false, filterable: false, sortable: false }, // 隐藏字段
|
||||
{ key: 'useType', label: '适用类型', visible: false, filterable: false, sortable: false }, // 隐藏字段
|
||||
{ key: 'status', label: '状态', visible: false, filterable: false, sortable: false }, // 隐藏字段
|
||||
{ key: 'key', label: '键值', visible: false, filterable: false, sortable: false }, // 隐藏字段
|
||||
{ key: 'created', label: '创建时间', visible: false, filterable: false, sortable: false }, // 隐藏字段
|
||||
{ key: 'updated', label: '更新时间', visible: false, filterable: false, sortable: false }, // 隐藏字段
|
||||
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'securityScore', label: '软件评分', visible: true, filterable: false, sortable: true },
|
||||
{ key: 'licenseCount', label: 'License数量', visible: true, filterable: false, sortable: false },
|
||||
{ key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'primaryLanguage', label: '编程语言', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'codeLines', label: '代码量', visible: true, filterable: false, sortable: false },
|
||||
]);
|
||||
const formData = ref({ title: '',type: '', useType: '',formData:'',select: '',time1:null,name:'',versionCode:'',pulishTime:'' });
|
||||
const typeOptions = reactive(['主软件', '依赖软件']);
|
||||
@@ -220,6 +203,20 @@ const openDelete = (row: any) => {
|
||||
deletevModels.value = true;
|
||||
};
|
||||
|
||||
const getReleaseList = async() => {
|
||||
const { data, error } = await releasePage({ current: pager.value.pageIndex,size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
debugger
|
||||
tableData.value = data.data.records;
|
||||
pager.value.total = data.data.total;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
getReleaseList();
|
||||
});
|
||||
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// 定义 showColumnList 状态
|
||||
@@ -241,6 +238,7 @@ const handleBatchImport = async() => { // 多个项目导入
|
||||
|
||||
// 跳转
|
||||
const gotoDetail = (row) => {
|
||||
/*TODO:如果是可使用、有风险的,点击软件版本,可跳转到软件详情页面;如果是未治理的,无法跳转*/
|
||||
// 后续请换成params,暂时params传参没传过去
|
||||
router.push({
|
||||
path: 'repoDetail/' + row.version
|
||||
@@ -285,18 +283,6 @@ const goMember = (row: any) => {
|
||||
query: { claId: row.object_id, claName: row.cla_name, group_path: namespace.value, pageType: 'edit' }
|
||||
});
|
||||
};
|
||||
|
||||
const filterVerifyResult = (type) => {
|
||||
if (currentReusltFilter.value === type) {
|
||||
currentReusltFilter.value = null;
|
||||
tableData.value = [...allTableData.value]
|
||||
} else {
|
||||
tableData.value = allTableData.value.filter(row => row.result === type);
|
||||
currentReusltFilter.value = type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const getGroupClaListData = async () => {
|
||||
// const params = {
|
||||
// group_id: namespace.value,
|
||||
|
||||
@@ -54,6 +54,10 @@ const sendSubscribe = async () => {
|
||||
type: 'error'
|
||||
})
|
||||
} else {
|
||||
Message({
|
||||
message: '订阅成功!',
|
||||
type: 'success'
|
||||
})
|
||||
emit('close');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
<!-- 漏洞详情 -->
|
||||
<d-drawer v-model="vulnDetailVisable" style="width: auto;">
|
||||
<VulnerabilityDetail :vulnId="currentVuln.id"></VulnerabilityDetail>
|
||||
<VulnerabilityDetail :vulnId="currentVuln.id" :vulnInfo="currentVuln"></VulnerabilityDetail>
|
||||
</d-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div class="vuln-detail-container">
|
||||
<div class="vuln-title mb-2">{{ vulnDetail.id }}</div>
|
||||
<div class="vuln-title mb-2">{{ vulnDetail.vulnId }}</div>
|
||||
<div class="vuln-sub-title mb-3">
|
||||
<span>{{ vulnDetail.cveId || '--' }}</span>
|
||||
<span>{{ vulnDetail.cweId || '--' }}</span>
|
||||
<span class="split-line"></span>
|
||||
<span><span class="release-time">发布时间:</span>{{ vulnDetail.releaseTime || '--' }}</span>
|
||||
<span><span class="release-time">发布时间:</span>{{ vulnDetail.publishDate || '--' }}</span>
|
||||
</div>
|
||||
<Card simple class="jyh-card mb-4">
|
||||
<div class="card-title">漏洞名称</div>
|
||||
<d-row class="mb-3">
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">漏洞名称</span>
|
||||
<span class="card-val">{{vulnDetail.id || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.vulnId || '--'}}</span>
|
||||
</d-col>
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">关联漏洞编号</span>
|
||||
<span class="card-val">{{vulnDetail.cnvdId || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.cweId || '--'}}</span>
|
||||
</d-col>
|
||||
</d-row>
|
||||
<d-row class="mb-3">
|
||||
@@ -28,8 +28,7 @@
|
||||
<d-col :span="24">
|
||||
<span class="card-key width-90">额外信息</span>
|
||||
<span class="card-val">
|
||||
<a v-for="link in vulnDetail.links" class="devui-link" :href="link" target="_blank" rel="noreferrer noopener">{{link}}</a>
|
||||
<span v-if="!vulnDetail.links || vulnDetail.links.length === 0">--</span>
|
||||
<span class="card-val">{{vulnDetail.extraInfo || '--'}}</span>
|
||||
</span>
|
||||
</d-col>
|
||||
</d-row>
|
||||
@@ -37,8 +36,7 @@
|
||||
<d-col :span="24">
|
||||
<span class="card-key width-90">补丁链接</span>
|
||||
<span class="card-val">
|
||||
<a v-for="link in vulnDetail.links2" class="devui-link" :href="link" target="_blank" rel="noreferrer noopener">{{link}}</a>
|
||||
<span v-if="!vulnDetail.links || vulnDetail.links.length === 0">--</span>
|
||||
<span class="card-val">{{vulnDetail.patchLink || '--'}}</span>
|
||||
</span>
|
||||
</d-col>
|
||||
</d-row>
|
||||
@@ -48,11 +46,11 @@
|
||||
<d-row class="mb-3">
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">严重性</span>
|
||||
<span class="card-val">{{vulnDetail.id || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.severity || '--'}}</span>
|
||||
</d-col>
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">分值</span>
|
||||
<span class="card-val">{{vulnDetail.code || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.cvssScore || '--'}}</span>
|
||||
</d-col>
|
||||
</d-row>
|
||||
</Card>
|
||||
@@ -61,21 +59,21 @@
|
||||
<d-row class="mb-3">
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">攻击向量</span>
|
||||
<span class="card-val">{{vulnDetail.id || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.attackVector || '--'}}</span>
|
||||
</d-col>
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">攻击复杂度</span>
|
||||
<span class="card-val">{{vulnDetail.complexity || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.attackComplexity || '--'}}</span>
|
||||
</d-col>
|
||||
</d-row>
|
||||
<d-row class="mb-3">
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">用户交互</span>
|
||||
<span class="card-val">{{vulnDetail.compName || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.userInteraction || '--'}}</span>
|
||||
</d-col>
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">需要特殊权限</span>
|
||||
<span class="card-val">{{vulnDetail.cnvdId || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.privilegesRequired || '--'}}</span>
|
||||
</d-col>
|
||||
</d-row>
|
||||
</Card>
|
||||
@@ -113,7 +111,7 @@
|
||||
<d-row class="mb-3">
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">补丁版本</span>
|
||||
<span class="card-val">{{vulnDetail.id || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.fixVersion || '--'}}</span>
|
||||
</d-col>
|
||||
<d-col :span="12">
|
||||
<span class="card-key width-90">修复兼容性</span>
|
||||
@@ -123,7 +121,7 @@
|
||||
<d-row>
|
||||
<d-col :span="24">
|
||||
<span class="card-key width-90">修复建议</span>
|
||||
<span class="card-val">{{vulnDetail.description || '--'}}</span>
|
||||
<span class="card-val">{{vulnDetail.fixIssue || '--'}}</span>
|
||||
</d-col>
|
||||
</d-row>
|
||||
</Card>
|
||||
@@ -134,22 +132,27 @@
|
||||
import { getVulnDetail } from '@/api/repo';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const propsData = defineProps(['repoId', 'vulnId']);
|
||||
const propsData = defineProps(['repoId', 'vulnId', 'vulnInfo']);
|
||||
const vulnDetail = ref({
|
||||
id: 'HWPSIRT-2022-29348',
|
||||
cveId: 'CVE-2013-0293',
|
||||
vulnId: 'HWPSIRT-2022-29348',
|
||||
cweId: 'CVE-2013-0293',
|
||||
cnvdId: 'CNVD-201105-215',
|
||||
name: '',
|
||||
code: '',
|
||||
description: '华为开发者社区致力于打造华为开发者专属的官方技术交流平台,帮助开发者探索开发实践、交流心得经验、获悉业界动态、解决开发问题。汇聚华为云社区“华为云”领域博客、问答、视频等精彩内容,形成开发者和技术爱好者交流与分享主阵地。',
|
||||
links: ['/home'],
|
||||
links2: ['/home'],
|
||||
vector: '',
|
||||
complexity: '',
|
||||
interactive: '',
|
||||
releaseTime: '2018-07-31',
|
||||
description: '攻击者通过特制的PUT请求执行任意SQL命令,可能导致数据库内容被操控。',
|
||||
extraInfo: '腾讯云丁安全实验室发现并报告该漏洞。',
|
||||
fixIssue: '使用参数化查询或预编译语句,避免SQL注入。',
|
||||
attackVector: '',
|
||||
attackComplexity: '',
|
||||
userInteraction: '',
|
||||
publishDate: '2018-07-31',
|
||||
compName: 'mplayer',
|
||||
version: '1.4',
|
||||
fixVersion: '1.4',
|
||||
"privilegesRequired": "None",
|
||||
"exploitabilityScore": 9.8,
|
||||
"impactScore": 10.0,
|
||||
"cvssScore": 9.9,
|
||||
"severity": "Critical",
|
||||
});
|
||||
|
||||
const queryVulnDetail = async () => {
|
||||
@@ -157,6 +160,7 @@ const queryVulnDetail = async () => {
|
||||
vulnDetail.value = data;
|
||||
};
|
||||
// queryVulnDetail();
|
||||
// vulnDetail.value = propsData.vulnInfo;
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<span>订阅漏洞预警通知</span>
|
||||
</div>
|
||||
</template>
|
||||
<SubscriptionModal @close="colseSubscription" :softwareData="softwareData"></SubscriptionModal>
|
||||
<SubscriptionModal @close="colseSubscription" :softwareData="{id: softwareId}"></SubscriptionModal>
|
||||
</d-modal>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +73,7 @@ import SubscriptionModal from '@/views/Jyh/Version/Detail/SubscriptionModal.vue'
|
||||
import { releaseInfo } from '@/api/jyh';
|
||||
|
||||
const selectTab = ref('bbxx');
|
||||
|
||||
const softwareId = ref();
|
||||
// 删除弹窗
|
||||
const item = ref('');
|
||||
const deleteModal = ref();
|
||||
@@ -96,6 +96,7 @@ const getReleaseInfo = async(versionId) => {
|
||||
|
||||
onMounted(() => {
|
||||
const versionId = route.params.versionId; // 获取路由参数 versionId
|
||||
softwareId.value = versionId;
|
||||
if (versionId) {
|
||||
getReleaseInfo(versionId); // 调用接口获取数据
|
||||
}
|
||||
@@ -194,13 +195,6 @@ const signCla = (row: any) => {
|
||||
router.push('/cla/' + row.object_id);
|
||||
};
|
||||
|
||||
const softwareData = ref({
|
||||
name: 'vue',
|
||||
version: '3.5.13',
|
||||
lifecycle: '选中型',
|
||||
risk: '低风险',
|
||||
});
|
||||
|
||||
const subscribeModalVisable = ref(false);
|
||||
const openSubscription = () => {
|
||||
subscribeModalVisable.value = true;
|
||||
|
||||
Reference in New Issue
Block a user