Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various changes #3

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
14 changes: 8 additions & 6 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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' }
],
Expand All @@ -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
Expand Down
163 changes: 153 additions & 10 deletions docs/.vitepress/others/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand All @@ -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: [
]
}
]
}
Empty file.
6 changes: 5 additions & 1 deletion docs/en-US/Trigger-Scan/Scan-Type.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ lang: en-US
tags: scan type, static, binary, build-based, docker, cli
---

<ClientOnly>

# {{ $frontmatter.title }}

>You can initiate scans for your projects under different environments
Expand Down Expand Up @@ -67,4 +69,6 @@ Scantist supports various types of scanning under different environments or scen
<td></td>
</tr>
</tbody>
</table>
</table>

</ClientOnly>
68 changes: 68 additions & 0 deletions docs/en-US/Trigger-Scan/Upload-Scan-Settings.md
Original file line number Diff line number Diff line change
@@ -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
---

<ClientOnly>

# {{ $frontmatter.title }}

>Get the most out of your upload scans with these configuration options

## Select your Scan Type

<hr style="border:2px solid gray" />

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

<hr style="border:2px solid gray" />

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
:::

<div style="display: flex;">
<div style="flex: 2;">

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

</div>
<div style="flex: 1;">

![insert image]()

</div>
</div>

</ClientOnly>
14 changes: 0 additions & 14 deletions docs/en-US/Trigger-Scan/build-based-scan-ci-cd/jenkins-ci.md

This file was deleted.

40 changes: 40 additions & 0 deletions docs/en-US/build-based-scan-ci-cd/Jenkins-CI-Integration.md
Original file line number Diff line number Diff line change
@@ -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
---

<ClientOnly>

# {{ $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

</ClientOnly>
Empty file.
2 changes: 1 addition & 1 deletion docs/zh-CN/Get-Started-with-Scantist/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lang: zh-CN

<ClientOnly>

# 开始使用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.

Expand Down