From 47951b85eef100de0b4095a2754cabfb9ef2920c Mon Sep 17 00:00:00 2001 From: Jackie Date: Wed, 26 Apr 2023 12:49:03 +0800 Subject: [PATCH] move files to archive, update various pages, change sidebar to a static one --- .../get-access-token.md | 0 .../en-US/Trigger-Scan => archive}/README.md | 0 .../build-based-scan-ci-cd/README.md | 0 docs/.vitepress/config.ts | 14 +- docs/.vitepress/others/sidebar.ts | 163 ++++++++++++++++-- docs/en-US/Trigger-Scan/SCM-Scan-Settings.md | 0 docs/en-US/Trigger-Scan/Scan-Type.md | 6 +- .../Trigger-Scan/Upload-Scan-Settings.md | 68 ++++++++ .../build-based-scan-ci-cd/jenkins-ci.md | 14 -- .../Jenkins-CI-Integration.md | 40 +++++ docs/en-US/build-based-scan-ci-cd/index.md | 0 .../build-based-scan-ci-cd/travis-ci.md | 0 docs/zh-CN/Get-Started-with-Scantist/index.md | 2 +- 13 files changed, 275 insertions(+), 32 deletions(-) rename {docs/en-US => archive}/Get-Started-with-Scantist/get-access-token.md (100%) rename {docs/en-US/Trigger-Scan => archive}/README.md (100%) rename {docs/en-US/Trigger-Scan => archive}/build-based-scan-ci-cd/README.md (100%) create mode 100644 docs/en-US/Trigger-Scan/SCM-Scan-Settings.md create mode 100644 docs/en-US/Trigger-Scan/Upload-Scan-Settings.md delete mode 100644 docs/en-US/Trigger-Scan/build-based-scan-ci-cd/jenkins-ci.md create mode 100644 docs/en-US/build-based-scan-ci-cd/Jenkins-CI-Integration.md create mode 100644 docs/en-US/build-based-scan-ci-cd/index.md rename docs/en-US/{Trigger-Scan => }/build-based-scan-ci-cd/travis-ci.md (100%) diff --git a/docs/en-US/Get-Started-with-Scantist/get-access-token.md b/archive/Get-Started-with-Scantist/get-access-token.md similarity index 100% rename from docs/en-US/Get-Started-with-Scantist/get-access-token.md rename to archive/Get-Started-with-Scantist/get-access-token.md diff --git a/docs/en-US/Trigger-Scan/README.md b/archive/README.md similarity index 100% rename from docs/en-US/Trigger-Scan/README.md rename to archive/README.md diff --git a/docs/en-US/Trigger-Scan/build-based-scan-ci-cd/README.md b/archive/build-based-scan-ci-cd/README.md similarity index 100% rename from docs/en-US/Trigger-Scan/build-based-scan-ci-cd/README.md rename to archive/build-based-scan-ci-cd/README.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index c645f8f..7483f1b 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -2,7 +2,7 @@ import fs from 'fs' import path from 'path' import { defineConfig } from 'vitepress' import { languages } from './utils/lang' -import { getSidebar } from './others/sidebar' +import { enUSSidebar, zhCNSidebar, getSidebar } from './others/sidebar' import { nav } from './others/nav' console.log('get nav', nav) @@ -36,7 +36,11 @@ export default defineConfig({ // https://vitepress.dev/reference/default-theme-config nav: [], i18nRouting: true, - sidebar: getSidebar() as any, + // sidebar: getSidebar() as any, + sidebar: { + '/en-US/': enUSSidebar() as any, + '/zh-CN/': zhCNSidebar() as any, + }, socialLinks: [ { icon: 'github', link: 'https://github.com/vuejs/vitepress' } ], @@ -45,13 +49,11 @@ export default defineConfig({ root: { label: 'English', lang: 'en-SG', - link: '/en-US/' + link: '/en-US/', }, - //'en-US': { - // label: 'English', - //}, 'zh-CN': { label: '简体中文', + link: '/zh-CN/' } }, lastUpdated: true diff --git a/docs/.vitepress/others/sidebar.ts b/docs/.vitepress/others/sidebar.ts index 9e788b6..5cb8142 100644 --- a/docs/.vitepress/others/sidebar.ts +++ b/docs/.vitepress/others/sidebar.ts @@ -4,7 +4,7 @@ import fs from "fs"; import path from "path"; function getSidebarItems(dir: string[], currentRoot: string | undefined, root: string | undefined, options: Options): object { - return dir.filter(e => e.endsWith('.md') || fs.statSync(path.resolve(currentRoot ?? '/', e)).isDirectory()).map((e: string) => { + return dir.filter(e => e.endsWith('.md') || fs.statSync(path.resolve(currentRoot ?? '/', e)).isDirectory()).map((e: string) => { const childDir: string = path.resolve(currentRoot ?? '/', e); if (fs.statSync(childDir).isDirectory()) { const sectionLink = `/en-US/`.concat(childDir.replace(root ?? '', '')).concat(`/index.md`); @@ -25,14 +25,157 @@ function getSidebarItems(dir: string[], currentRoot: string | undefined, root: s }); }; -export function getSidebar(options: Options = {}) { - options.contentRoot = options?.contentRoot ?? '/docs/en-US/'; - options.contentDirs = options?.contentDirs ?? null; - options.collapsible = options?.collapsible ?? true; - options.collapsed = options?.collapsed ?? true; +// export function getSidebar(options: Options = {}) { +// options.contentRoot = options?.contentRoot ?? '/docs/en-US/'; +// options.contentDirs = options?.contentDirs ?? null; +// options.collapsible = options?.collapsible ?? true; +// options.collapsed = options?.collapsed ?? true; - options.contentRoot = path.join(process.cwd(), options.contentRoot) - console.log('options contentroot', options.contentRoot); - const dir = fs.readdirSync(options.contentRoot).filter((file: string) => (options.contentDirs === null || options.contentDirs?.indexOf(file) !== -1) && fs.statSync(path.join(options.contentRoot ?? '/', file)).isDirectory()); - return getSidebarItems(dir, options.contentRoot, options.contentRoot, options) +// options.contentRoot = path.join(process.cwd(), options.contentRoot) +// console.log('options contentroot', options.contentRoot); +// const dir = fs.readdirSync(options.contentRoot).filter((file: string) => (options.contentDirs === null || options.contentDirs?.indexOf(file) !== -1) && fs.statSync(path.join(options.contentRoot ?? '/', file)).isDirectory()); +// return getSidebarItems(dir, options.contentRoot, options.contentRoot, options) +// } + +export function getSidebar() { + return [{ + text: 'Get Started with Scantist', + collapsed: true, + collapsible: true, + link: '/Get-Started-with-Scantist' + }]; +} + +export function enUSSidebar() { + return [ + { + text: 'Get Started with Scantist', + link: '/en-US/Get-Started-with-Scantist/', + collapsed: true, + collapsible: true, + items: [ + { + text: 'Sign up for Scantist', + link: '/en-US/Get-Started-with-Scantist/Sign-up-for-Scantist' + }, + { + text: 'SCM Integration', + link: '/en-US/Get-Started-with-Scantist/SCM-Integration' + }, + { + text: 'Organization Group', + link: '/en-US/Get-Started-with-Scantist/Organization-Group' + } + ] + }, + { + text: 'Language and File Support', + link: '/en-US/Language-and-File-Support/', + collapsed: true, + collapsible: true, + items: [ + { + text: 'Java Language Support', + link: '/en-US/Language-and-File-Support/Java-Language-Support' + }, + { + text: 'JavaScript Language Support', + link: '/en-US/Language-and-File-Support/JavaScript-Language-Support' + }, + { + text: 'Perl Language Support', + link: '/en-US/Language-and-File-Support/Perl-Language-Support' + }, + { + text: 'Go Language Support', + link: '/en-US/Language-and-File-Support/Go-Language-Support' + }, + { + text: 'Python Language Support', + link: '/en-US/Language-and-File-Support/Python-Language-Support' + }, + { + text: 'C# Language Support', + link: '/en-US/Language-and-File-Support/Csharp-Language-Support' + }, + { + text: 'Ruby Language Support', + link: '/en-US/Language-and-File-Support/Ruby-Language-Support' + }, + { + text: 'PHP Language Support', + link: '/en-US/Language-and-File-Support/PHP-Language-Support' + }, + { + text: 'Objective-C Language Support', + link: '/en-US/Language-and-File-Support/Objective--C-Language-Support' + }, + { + text: 'Swift Language Support', + link: '/en-US/Language-and-File-Support/Swift-Language-Support' + }, + ] + }, + { + text: 'Create and Manage Project', + link: '/en-US/Create-and-Manage-Project/', + collapsed: true, + collapsible: true, + items: [ + { + text: 'Upload Files Directly', + link: '/en-US/Create-and-Manage-Project/Upload-Files-Directly' + }, + { + text: 'Add SCM Repositories', + link: '/en-US/Create-and-Manage-Project/Add-SCM-Repositories' + }, + ] + }, + { + text: 'Trigger Scan', + link: '/en-US/Trigger-Scan/', + collapsed: true, + collapsible: true, + items: [ + { + text: 'Scan Type', + link: '/en-US/Trigger-Scan/Scan-Type' + }, + { + text: 'Upload Scan Settings', + link: '/en-US/Trigger-Scan/Upload-Scan-Settings' + }, + { + text: 'SCM Scan Settings', + link: '/en-US/Trigger-Scan/SCM-Scan-Settings' + } + ] + }, + { + text: 'Build-based Scan - CI/CD Pipeline', + link: '/en-US/build-based-scan-ci-cd/', + collapsed: true, + collapsible: true, + items: [ + { + text: 'Jenkins CI Integration', + link: '/en-US/build-based-scan-ci-cd/Jenkins-CI-Integration' + }, + ] + }, + ] +} + +export function zhCNSidebar() { + return [ + { + text: '开始使用思探明', + link: '/zh-CN/Get-Started-with-Scantist/', + collapsed: true, + collapsible: true, + items: [ + ] + } + ] } \ No newline at end of file diff --git a/docs/en-US/Trigger-Scan/SCM-Scan-Settings.md b/docs/en-US/Trigger-Scan/SCM-Scan-Settings.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/en-US/Trigger-Scan/Scan-Type.md b/docs/en-US/Trigger-Scan/Scan-Type.md index 5e17897..6ddb448 100644 --- a/docs/en-US/Trigger-Scan/Scan-Type.md +++ b/docs/en-US/Trigger-Scan/Scan-Type.md @@ -6,6 +6,8 @@ lang: en-US tags: scan type, static, binary, build-based, docker, cli --- + + # {{ $frontmatter.title }} >You can initiate scans for your projects under different environments @@ -67,4 +69,6 @@ Scantist supports various types of scanning under different environments or scen - \ No newline at end of file + + + \ No newline at end of file diff --git a/docs/en-US/Trigger-Scan/Upload-Scan-Settings.md b/docs/en-US/Trigger-Scan/Upload-Scan-Settings.md new file mode 100644 index 0000000..0f51e6a --- /dev/null +++ b/docs/en-US/Trigger-Scan/Upload-Scan-Settings.md @@ -0,0 +1,68 @@ +--- +title: Upload Scan Settings +author: Shamala Mani Vannan, Jackie Tan +page: true +lang: en-US +tags: scan type, schedule scan, binary, build-based, docker, cli +--- + + + +# {{ $frontmatter.title }} + +>Get the most out of your upload scans with these configuration options + +## Select your Scan Type + +
+ +1. Click on the newly added project + +2. Click on "Project Settings" in the top right corner + +3. Under the "Scan Settings", select the testing solution you want to configure + +![insert image]() + +## Schedule Scan + +
+ +You can set your scan to be done on a scheduled basis for all scan types. The available options for the scheduled scans are as follows: + +::: tip Daily +7:00 AM Singapore Timezone +::: + +::: tip Weekly +every Monday at 7:00 AM Singapore Timezone +::: + +::: tip Monthly +Starting from the date the scheduled scan is enabled. For example, if you enable the schedule scan settings on Janaury 1, the subsequent monthly scans will occur on the 1st of every month +::: + +
+
+ +To schedule a scan in Scantist, you can follow these steps: + +1. Toggle the switch to enable scheduled scans + +2. Choose whether your project is a source code or binary project + +3. Select the version of the project that you want to scan + +4. Choose the frequency of the scheduled scan: daily, weekly or monthly + +5. Click "Save" to save the scheduled scan settings + +
+
+ +![insert image]() + +
+
+ +
\ No newline at end of file diff --git a/docs/en-US/Trigger-Scan/build-based-scan-ci-cd/jenkins-ci.md b/docs/en-US/Trigger-Scan/build-based-scan-ci-cd/jenkins-ci.md deleted file mode 100644 index 3e166a2..0000000 --- a/docs/en-US/Trigger-Scan/build-based-scan-ci-cd/jenkins-ci.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -description: This document explains how to integrate Jenkins CI ---- - -# Jenkins CI - -## Overview - -Jenkins offers a simple way to set up a continuous integration or continuous delivery environment for almost any combination of languages and source code repositories using pipelines, as well as automating other routine development tasks. **** It is commonly used to build, test and deploy applications when there are new changes to your source code. Integrating Scantist SCA as part of your development life cycle enforces security and licensing compliance in the CI/CD pipeline. - -There are 2 options to integrate Scantist SCA with your Jenkins CI: - -### Option 1: Build Script on Jenkins CI - diff --git a/docs/en-US/build-based-scan-ci-cd/Jenkins-CI-Integration.md b/docs/en-US/build-based-scan-ci-cd/Jenkins-CI-Integration.md new file mode 100644 index 0000000..11f2292 --- /dev/null +++ b/docs/en-US/build-based-scan-ci-cd/Jenkins-CI-Integration.md @@ -0,0 +1,40 @@ +--- +title: Jenkins CI Integration +author: Shamala Mani Vannan, Jackie Tan +page: true +lang: en-US +tags: ci, jenkins, continuous integration +description: This document explains how to integrate Jenkins CI +--- + + + +# {{ $frontmatter.title }} + +>Discover Scantist's capabilities with Jenkins integration + +## Jenkins CI + +Jenkins is a popular choice of continuous integration and continuous delivery solution for developers to integrate with a variety of development, testing, and deployment tools. Jenkins is highly extensible and customizable, which makes it suitable for a wide range of projects - from small single-developer projects to large enterprise-level applications. + +Integrating Scantist into the development lifecycle of Jenkins CI can help enforce security and licensing compliance in the CI/CD pipeline. There are two ways to integrate Scantist with Jenkins CI: + +1. Using Jenkinsfile + +2. Using Scantist CLI + +## Follow these steps to integrate Scantist with Jenkins CI using Jenkinsfile + + +This approach allows Jenkins users to scan their code for security vulnerabilities and licensing issues during the build process. + +**1. Create access token** + +You will need to create an access token on Scantist to authenticate and authorize the integration between Scantist and other tools. + +…….. + +Follow these steps to integrate Scantist with Jenkins CI using Scantist CLI +This approach involves running the Scantist CLI as part of your Jenkins build process - can be more flexible than using the Jenkinsfile, but it required more configuration and setup + + \ No newline at end of file diff --git a/docs/en-US/build-based-scan-ci-cd/index.md b/docs/en-US/build-based-scan-ci-cd/index.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/en-US/Trigger-Scan/build-based-scan-ci-cd/travis-ci.md b/docs/en-US/build-based-scan-ci-cd/travis-ci.md similarity index 100% rename from docs/en-US/Trigger-Scan/build-based-scan-ci-cd/travis-ci.md rename to docs/en-US/build-based-scan-ci-cd/travis-ci.md diff --git a/docs/zh-CN/Get-Started-with-Scantist/index.md b/docs/zh-CN/Get-Started-with-Scantist/index.md index 0a55295..b1b3637 100644 --- a/docs/zh-CN/Get-Started-with-Scantist/index.md +++ b/docs/zh-CN/Get-Started-with-Scantist/index.md @@ -6,7 +6,7 @@ lang: zh-CN -# 开始使用Scantist +# 开始使用思探明 > Discover the ultimate tool for managing and securing the use of your open source software. With Scantist, you can easily identify vulnerabilities and licensing risks in your open source projects and remediate them efficiently.