Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit add02ef

Browse files
authored
Merge pull request #9 from secureCodeBox/v2-beta
Update website for v2
2 parents fef94d5 + 1228a8f commit add02ef

32 files changed

Lines changed: 448 additions & 139 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Since we work with various different tools, it is even more important to keep a
7777

7878
### Adding a scanner or persistence provider
7979

80-
Scanner and persistence provider are referred as integrations. Scanner, which are integrated into our secureCodeBox project have their own repository in which the main documentation must be written in the README.md. Persistence provider documentation is located at `/src/pages/integrations/persistence-provider/`.
80+
Scanners and persistence providers are referred to as integrations. Scanners, which are integrated into our [secureCodeBox-v2-alpha](https://github.com/secureCodeBox/secureCodeBox-v2-alpha) repository have their own directories (located at [/scanners/](https://github.com/secureCodeBox/secureCodeBox-v2-alpha/tree/master/scanners)) in which the main documentation must be written in a `README.md` file. Persistence provider documentation is located at `/src/pages/integrations/persistence-provider/`.
8181

8282
#### Scanner
8383

@@ -86,7 +86,7 @@ To add a scanner documentation you need to extend the `scannerRepos` Array in th
8686
```bash
8787
{
8888
name: 'scanner name',
89-
url: 'https://github.com/secureCodeBox/scanner_repository',
89+
directory: 'directoryName' # in /scanners/
9090
}
9191
```
9292

@@ -98,11 +98,11 @@ Additionally you can and (for the sake of aesthetics) should provide an icon in
9898
<pre>
9999

100100
---
101+
101102
title: "Scame"
102103
path: "scanner/Scame"
103104
category: "scanner"
104105
usecase: "general use of this scanner"
105-
release: "url to the release badge"
106106

107107
---
108108

gatsby-config.js

Lines changed: 25 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,6 @@
44
* See: https://www.gatsbyjs.org/docs/gatsby-config/
55
*/
66

7-
const scannerRepos = [
8-
{
9-
name: 'Amass',
10-
url: 'https://github.com/secureCodeBox/scanner-infrastructure-amass',
11-
},
12-
{
13-
name: 'Arachni',
14-
url: 'https://github.com/secureCodeBox/scanner-webapplication-arachni',
15-
},
16-
{
17-
name: 'Nikto',
18-
url: 'https://github.com/secureCodeBox/scanner-webserver-nikto',
19-
},
20-
{
21-
name: 'Nmap',
22-
url: 'https://github.com/secureCodeBox/scanner-infrastructure-nmap',
23-
},
24-
{
25-
name: 'SSH',
26-
url: 'https://github.com/secureCodeBox/scanner-infrastructure-ssh',
27-
},
28-
{
29-
name: 'SSLyze',
30-
url: 'https://github.com/secureCodeBox/scanner-infrastructure-sslyze',
31-
},
32-
{
33-
name: 'Zap',
34-
url: 'https://github.com/secureCodeBox/scanner-webapplication-zap',
35-
},
36-
{
37-
name: 'WPScan',
38-
url: 'https://github.com/secureCodeBox/scanner-cms-wpscan',
39-
},
40-
{
41-
name: 'Ncrack',
42-
url: 'https://github.com/secureCodeBox/scanner-infrastructure-ncrack',
43-
},
44-
];
45-
467
module.exports = {
478
siteMetadata: {
489
title: `secureCodeBox`,
@@ -59,14 +20,14 @@ module.exports = {
5920
name: 'Get Started',
6021
external: true,
6122
// link: '/getStarted',
62-
link: 'https://github.com/secureCodeBox/secureCodeBox',
23+
link: 'https://github.com/secureCodeBox/secureCodeBox-v2-alpha',
6324
},
6425
{
6526
name: 'Docs',
6627
external: true,
6728
// link: '/docs',
6829
link:
69-
'https://github.com/secureCodeBox/secureCodeBox/tree/master/docs/index.md',
30+
'https://github.com/secureCodeBox/secureCodeBox-v2-alpha/blob/master/docs/index.md',
7031
},
7132
{
7233
name: 'Integrations',
@@ -133,16 +94,28 @@ module.exports = {
13394
name: 'images',
13495
},
13596
},
136-
...scannerRepos.map(({ name, url }) => {
137-
return {
138-
resolve: `gatsby-source-git`,
139-
options: {
140-
name: name,
141-
remote: url,
142-
branch: `master`,
143-
patterns: `README.md`,
144-
},
145-
};
146-
}),
97+
{
98+
resolve: `gatsby-source-git`,
99+
options: {
100+
name: `secureCodeBox-v2-alpha`,
101+
remote: `https://github.com/secureCodeBox/secureCodeBox-v2-alpha`,
102+
branch: `master`,
103+
patterns: [`scanners`, `hooks`, `docs`],
104+
},
105+
},
106+
{
107+
resolve: `gatsby-source-filesystem`,
108+
options: {
109+
name: `scanners`,
110+
path: `${__dirname}/.cache/gatsby-source-git/secureCodeBox-v2-alpha/scanners`,
111+
}
112+
},
113+
{
114+
resolve: `gatsby-source-filesystem`,
115+
options: {
116+
name: `hooks`,
117+
path: `${__dirname}/.cache/gatsby-source-git/secureCodeBox-v2-alpha/hooks`,
118+
}
119+
}
147120
],
148121
};

gatsby-node.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require("path");
2+
const fs = require("fs");
23

34
// Create pages from markdown files
45
exports.createPages = ({ graphql, actions }) => {
@@ -113,3 +114,15 @@ exports.createPages = ({ graphql, actions }) => {
113114
);
114115
});
115116
};
117+
118+
exports.onCreateNode = ({ node, actions }) => {
119+
const { createNodeField } = actions;
120+
121+
if (node.internal.type === `File` && (node.base === `scan.yaml` || node.base === `findings.yaml`)) {
122+
fs.readFile(node.absolutePath, undefined, (_err, buf) => {
123+
createNodeField({ node, name: `content`, value: buf.toString() });
124+
});
125+
createNodeField({ node, name: `fileName`, value: node.base });
126+
createNodeField({ node, name: `scanTarget`, value: node.relativeDirectory.split('/examples/')[1] });
127+
}
128+
}

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"react": "^16.13.1",
2929
"react-burger-menu": "^2.7.0",
3030
"react-dom": "^16.13.1",
31-
"react-helmet": "^6.1.0"
31+
"react-helmet": "^6.1.0",
32+
"react-tabs": "^3.1.1"
3233
},
3334
"devDependencies": {
3435
"node-sass": "^4.14.1",

src/components/BetaAlert.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
3+
const BetaAlert = () => (
4+
<div className="alert alert-warning beta-alert" role="alert">
5+
You are looking at preliminary documentation for secureCodeBox v2 beta. Not what you want? See <a
6+
href="https://github.com/secureCodeBox/secureCodeBox/blob/master/README.md"
7+
className="alert-link"
8+
rel="noreferrer"
9+
target="_blank">
10+
latest stable release documentation
11+
</a>.
12+
</div>
13+
);
14+
15+
export default BetaAlert;

src/components/Footer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ const Footer = props => (
2323
</a>
2424
</li>
2525
<li className="copyright">
26-
© {new Date().getFullYear()}{' '}
27-
{props.data.site.siteMetadata.company}
26+
<a href="https://www.iteratec.de">
27+
© {new Date().getFullYear()}{' '}
28+
{props.data.site.siteMetadata.company}
29+
</a>
2830
</li>
2931
</ul>
3032
</div>

src/components/IntegrationCard.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import React from 'react';
2+
import { withPrefix } from 'gatsby';
3+
4+
const IntegrationCard = (props) => {
5+
return (
6+
<div className="row integration-card hoverable">
7+
<div className="col-xl-2 col-lg-3 col-md-4 col-sm-4 col-4 integration-card-scanner-icon my-auto">
8+
<img
9+
className="scanner-icon"
10+
src={withPrefix(
11+
'/integrationIcons/' + props.frontmatter.title + '.svg'
12+
)}
13+
alt="persistence provider icon"
14+
></img>
15+
</div>
16+
<div className="col-xl-8 col-lg-6 col-md-8 col-sm-8 col-8">
17+
<h2 className="integration-card-title">
18+
{props.frontmatter.title}
19+
{props.frontmatter.category === 'scanner'
20+
? props.frontmatter.type.length > 0 && (
21+
<strong> ({props.frontmatter.type}) </strong>
22+
)
23+
: ''}
24+
</h2>
25+
<div className="integration-card-content">
26+
<p>{props.frontmatter.usecase}</p>
27+
</div>
28+
</div>
29+
<div className="col-xl-2 col-lg-3 col-md-12 col-sm-12 col-12 integration-card-scanner-icon my-auto">
30+
<div className="row">
31+
<div className="col-lg-12 col-md-6 col-sm-6 col-6">
32+
{props.frontmatter.state.length > 0 &&
33+
props.frontmatter.state === 'released' && (
34+
<img
35+
className="release"
36+
src={withPrefix(
37+
'https://img.shields.io/badge/State-' +
38+
props.frontmatter.state +
39+
'-green'
40+
)}
41+
alt="release version"
42+
></img>
43+
)}
44+
{props.frontmatter.state.length > 0 &&
45+
props.frontmatter.state === 'developing' && (
46+
<img
47+
className="release"
48+
src={withPrefix(
49+
'https://img.shields.io/badge/State-' +
50+
props.frontmatter.state +
51+
'-yellow'
52+
)}
53+
alt="release version"
54+
></img>
55+
)}
56+
{props.frontmatter.state.length > 0 &&
57+
props.frontmatter.state === 'roadmap' && (
58+
<img
59+
className="release"
60+
src={withPrefix(
61+
'https://img.shields.io/badge/State-' +
62+
props.frontmatter.state +
63+
'-lightgray'
64+
)}
65+
alt="release version"
66+
></img>
67+
)}
68+
</div>
69+
<div className="col-lg-12 col-md-6 col-sm-6 col-6">
70+
{props.frontmatter.appVersion && (
71+
<img
72+
className="release"
73+
src={withPrefix(
74+
'https://img.shields.io/badge/App_Version-' +
75+
props.frontmatter.appVersion +
76+
'-blue'
77+
)}
78+
alt="release version"
79+
></img>
80+
)}
81+
</div>
82+
</div>
83+
</div>
84+
</div>
85+
);
86+
};
87+
88+
export default IntegrationCard;

src/components/Layout.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ import React from 'react';
22
import SEO from './SEO';
33
import Header from './Header';
44
import Footer from './Footer';
5+
import BetaAlert from './BetaAlert';
56
import '../scss/style.scss';
6-
import MenuMobile from "../components/MenuMobile";
7+
import MenuMobile from "../components/MenuMobile";
78

89
const Layout = props => {
910
return (
1011
<React.Fragment>
1112
<SEO />
1213
<div className={`page${props.bodyClass ? ` ${props.bodyClass}` : ""}`}>
1314
<div id="wrapper" className="wrapper">
15+
<BetaAlert />
1416
<Header />
1517
<MenuMobile />
1618
{props.children}

src/components/MenuMobile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const MenuMobile = props => {
1919
}}
2020
>
2121
{menuLinks.map(link => (
22-
<Link to={link.link}>{link.name}</Link>
22+
<Link to={link.link} key={link.name}>{link.name}</Link>
2323
))}
2424
</Menu>
2525
);

0 commit comments

Comments
 (0)