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

Commit 27f7a61

Browse files
author
dpatanin
committed
query remote README's from scanner repos
1 parent 7aaa5e9 commit 27f7a61

9 files changed

Lines changed: 186 additions & 121 deletions

File tree

gatsby-config.js

Lines changed: 79 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,82 @@
44
* See: https://www.gatsbyjs.org/docs/gatsby-config/
55
*/
66

7-
module.exports = {
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: "WPscan",
34+
url: "https://github.com/secureCodeBox/scanner-cms-wpscan"
35+
},
36+
{
37+
name: "Zap",
38+
url: "https://github.com/secureCodeBox/scanner-webapplication-zap"
39+
}
40+
];
841

42+
module.exports = {
943
siteMetadata: {
1044
title: `secureCodeBox`,
1145
company: `iteratec GmbH`,
12-
description: '',
46+
description: "",
1347
// siteUrl: '',
1448
contact: {
15-
phone: 'XXX XXX XXX',
16-
email: 'security@iteratec.de',
49+
phone: "XXX XXX XXX",
50+
email: "security@iteratec.de"
1751
},
1852
// TODO: replace links with actual pages here and link the correct reference in Menu.js
1953
menuLinks: [
2054
{
21-
name: 'Get Started',
55+
name: "Get Started",
2256
// link: '/getStarted',
23-
link: 'https://github.com/secureCodeBox/secureCodeBox',
57+
link: "https://github.com/secureCodeBox/secureCodeBox"
2458
},
2559
{
26-
name: 'Docs',
60+
name: "Docs",
2761
// link: '/docs',
28-
link: 'https://github.com/secureCodeBox/secureCodeBox/tree/master/docs',
29-
},
62+
link: "https://github.com/secureCodeBox/secureCodeBox/tree/master/docs"
63+
}
3064
// {
3165
// name: 'Scanner',
3266
// link: '/scanner',
3367
// },
34-
],
68+
]
3569
},
3670

3771
plugins: [
3872
`gatsby-plugin-emotion`,
3973
`gatsby-plugin-sass`,
4074
`gatsby-transformer-json`,
4175
{
42-
"resolve": `gatsby-transformer-remark`,
43-
"options": {
44-
"tableOfContents": {
45-
"heading": null,
46-
"maxDepth": 6,
76+
resolve: `gatsby-transformer-remark`,
77+
options: {
78+
tableOfContents: {
79+
heading: null,
80+
maxDepth: 6
4781
},
48-
"excerpt_separator": `<!-- end -->`
82+
excerpt_separator: `<!-- end -->`
4983
}
5084
},
5185
{
@@ -59,38 +93,50 @@ module.exports = {
5993
// Enables "Add to Homescreen" prompt and disables browser UI (including back button)
6094
// see https://developers.google.com/web/fundamentals/web-app-manifest/#display
6195
display: `standalone`,
62-
icon: `src/images/icon.png`, // This path is relative to the root of the site.
63-
},
96+
icon: `src/images/icon.png` // This path is relative to the root of the site.
97+
}
6498
},
65-
`gatsby-plugin-offline`, //should be listed *after* gatsby-plugin-manifest
99+
`gatsby-plugin-offline`, //should be listed *after* gatsby-plugin-manifest
66100
`gatsby-plugin-react-helmet`,
67101
{
68102
resolve: `gatsby-source-filesystem`,
69103
options: {
70-
name: 'src',
71-
path: `${__dirname}/src/`,
72-
},
104+
name: "src",
105+
path: `${__dirname}/src/`
106+
}
73107
},
74108
{
75-
resolve: 'gatsby-source-filesystem',
109+
resolve: "gatsby-source-filesystem",
76110
options: {
77111
path: `${__dirname}/src/pages`,
78-
name: 'pages',
79-
},
112+
name: "pages"
113+
}
80114
},
81115
{
82-
resolve: 'gatsby-source-filesystem',
116+
resolve: "gatsby-source-filesystem",
83117
options: {
84118
path: `${__dirname}/src/data`,
85-
name: 'data',
86-
},
119+
name: "data"
120+
}
87121
},
88122
{
89-
resolve: 'gatsby-source-filesystem',
123+
resolve: "gatsby-source-filesystem",
90124
options: {
91125
path: `${__dirname}/src/images`,
92-
name: 'images',
93-
},
126+
name: "images"
127+
}
94128
},
95-
],
96-
}
129+
130+
...scannerRepos.map(({ name, url }) => {
131+
return {
132+
resolve: `gatsby-source-git`,
133+
options: {
134+
name: name,
135+
remote: url,
136+
branch: `update-doc`,
137+
patterns: `README.md`
138+
}
139+
};
140+
})
141+
]
142+
};

gatsby-node.js

Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,88 @@
1-
const path = require('path');
1+
const path = require("path");
22

33
// Create pages from markdown files
44
exports.createPages = ({ graphql, actions }) => {
55
const { createPage } = actions;
66
return new Promise((resolve, reject) => {
77
resolve(
88
graphql(`
9-
{
10-
getStarted: allMarkdownRemark(
11-
filter: { fileAbsolutePath: { regex: "/getStarted/" } }
12-
sort: { fields: [frontmatter___date], order: DESC }
13-
) {
14-
edges {
15-
node {
16-
id
17-
frontmatter {
18-
path
19-
title
20-
}
21-
excerpt
9+
{
10+
getStarted: allMarkdownRemark(
11+
filter: { fileAbsolutePath: { regex: "/getStarted/" } }
12+
sort: { fields: [frontmatter___date], order: DESC }
13+
) {
14+
edges {
15+
node {
16+
id
17+
frontmatter {
18+
path
19+
title
2220
}
21+
excerpt
2322
}
2423
}
25-
docs: allMarkdownRemark(
26-
filter: { fileAbsolutePath: { regex: "/docs/" } }
27-
sort: { fields: [frontmatter___date], order: DESC }
28-
) {
29-
edges {
30-
node {
31-
id
32-
frontmatter {
33-
path
34-
title
35-
}
36-
excerpt
24+
}
25+
docs: allMarkdownRemark(
26+
filter: { fileAbsolutePath: { regex: "/docs/" } }
27+
sort: { fields: [frontmatter___date], order: DESC }
28+
) {
29+
edges {
30+
node {
31+
id
32+
frontmatter {
33+
path
34+
title
3735
}
36+
excerpt
3837
}
3938
}
40-
scanner: allMarkdownRemark(
41-
filter: { fileAbsolutePath: { regex: "/scanner/" } }
42-
sort: { fields: [frontmatter___date], order: DESC }
43-
) {
44-
edges {
45-
node {
46-
id
47-
frontmatter {
48-
path
49-
title
50-
}
51-
excerpt
39+
}
40+
scanner: allMarkdownRemark(
41+
filter: {fileAbsolutePath: { regex: "/gatsby-source-git/"} }
42+
) {
43+
edges {
44+
node {
45+
frontmatter {
46+
title
5247
}
48+
id
5349
}
5450
}
5551
}
56-
`,
57-
).then(result => {
52+
}
53+
`).then(result => {
5854
result.data.getStarted.edges.forEach(({ node }) => {
59-
const component = path.resolve('src/templates/getStarted.js');
55+
const component = path.resolve("src/templates/getStarted.js");
6056
createPage({
6157
path: node.frontmatter.path,
6258
component,
6359
context: {
64-
id: node.id,
65-
},
60+
id: node.id
61+
}
6662
});
6763
});
6864
result.data.docs.edges.forEach(({ node }) => {
69-
const component = path.resolve('src/templates/docs.js');
65+
const component = path.resolve("src/templates/docs.js");
7066
createPage({
7167
path: node.frontmatter.path,
7268
component,
7369
context: {
74-
id: node.id,
75-
},
70+
id: node.id
71+
}
7672
});
7773
});
7874
result.data.scanner.edges.forEach(({ node }) => {
79-
const component = path.resolve('src/templates/scanner.js');
75+
const component = path.resolve("src/templates/scanner.js");
8076
createPage({
81-
path: node.frontmatter.path,
77+
path: "/scanner/" + node.frontmatter.title,
8278
component,
8379
context: {
84-
id: node.id,
85-
},
80+
id: node.id
81+
}
8682
});
8783
});
8884
resolve();
89-
}),
85+
})
9086
);
9187
});
9288
};

package-lock.json

Lines changed: 38 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"gatsby-plugin-react-helmet": "^3.1.2",
2222
"gatsby-plugin-sass": "^2.1.8",
2323
"gatsby-source-filesystem": "^2.1.7",
24+
"gatsby-source-git": "github:stevetweeddale/gatsby-source-git",
2425
"gatsby-transformer-json": "^2.2.2",
2526
"gatsby-transformer-remark": "^2.6.10",
2627
"react": "^16.8.6",

src/scss/_bootstrap-variables.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
$grid-gutter-width: 20px;
1818

19-
// TODO: adjust color scheme and fonts
2019
$white: #ffffff;
2120
$black: #000000;
2221
$primary: #1c3ed3;

src/scss/pages/testimonials/_page-testimonials.scss renamed to src/scss/pages/scanners/_page-scanners.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
.page-testimonials {
2-
// background-image: url('../images/undraw_hang_out_h9ud.svg');
1+
.page-scanners {
32
background-repeat: no-repeat;
43
background-size: 115%;
54
background-position: 49px -40px;

0 commit comments

Comments
 (0)