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

Commit 8d49750

Browse files
Added security page (#1297)
* Added security page * Added security page * Removed linting issue from security page * Fixed linting issues * Added Security Page and Sidenav bar * Added Security Page and Sidenav bar * Removed additional function for security page test * Changed Describe function of security test * Updated Snapshots Co-authored-by: Ben Halverson <7907232+benhalverson@users.noreply.github.com>
1 parent b9d783e commit 8d49750

24 files changed

+666
-20
lines changed

content/about/security.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Security
3+
description: 'This is security page'
4+
authors: reedloden,XhmikosR,Trott,fhemberger,MaledongGit,yous,sam-github,vdeturckheim,tniessen,richardlau,nschonni,mikeal,e-jigsaw,parthlaw
5+
category: security
6+
---
7+
8+
## Reporting a Bug in Node.js
9+
10+
Report security bugs in Node.js via [HackerOne](https://hackerone.com/nodejs).
11+
12+
Your report will be acknowledged within 24 hours, and you’ll receive a more
13+
detailed response to your report within 48 hours indicating the next steps in
14+
handling your submission.
15+
16+
After the initial reply to your report, the security team will endeavor to keep
17+
you informed of the progress being made towards a fix and full announcement,
18+
and may ask for additional information or guidance surrounding the reported
19+
issue.
20+
21+
### Node.js Bug Bounty Program
22+
23+
The Node.js project engages in an official bug bounty program for security
24+
researchers and responsible public disclosures. The program is managed through
25+
the HackerOne platform. See <https://hackerone.com/nodejs> for further details.
26+
27+
## Reporting a Bug in a third party module
28+
29+
Security bugs in third party modules should be reported to their respective
30+
maintainers and should also be coordinated through the Node.js Ecosystem
31+
Security Team via [HackerOne](https://hackerone.com/nodejs-ecosystem).
32+
33+
Details regarding this process can be found in the
34+
[Security Working Group repository](https://github.com/nodejs/security-wg/blob/master/processes/third_party_vuln_process.md).
35+
36+
Thank you for improving the security of Node.js and its ecosystem. Your efforts
37+
and responsible disclosure are greatly appreciated and will be acknowledged.
38+
39+
## Disclosure Policy
40+
41+
Here is the security disclosure policy for Node.js
42+
43+
* The security report is received and is assigned a primary handler. This
44+
person will coordinate the fix and release process. The problem is confirmed
45+
and a list of all affected versions is determined. Code is audited to find
46+
any potential similar problems. Fixes are prepared for all releases which are
47+
still under maintenance. These fixes are not committed to the public
48+
repository but rather held locally pending the announcement.
49+
50+
* A suggested embargo date for this vulnerability is chosen and a CVE (Common
51+
Vulnerabilities and Exposures (CVE®)) is requested for the vulnerability.
52+
53+
* On the embargo date, the Node.js security mailing list is sent a copy of the
54+
announcement. The changes are pushed to the public repository and new builds
55+
are deployed to nodejs.org. Within 6 hours of the mailing list being
56+
notified, a copy of the advisory will be published on the Node.js blog.
57+
58+
* Typically the embargo date will be set 72 hours from the time the CVE is
59+
issued. However, this may vary depending on the severity of the bug or
60+
difficulty in applying a fix.
61+
62+
* This process can take some time, especially when coordination is required
63+
with maintainers of other projects. Every effort will be made to handle the
64+
bug in as timely a manner as possible; however, it’s important that we follow
65+
the release process above to ensure that the disclosure is handled in a
66+
consistent manner.
67+
68+
## Receiving Security Updates
69+
70+
Security notifications will be distributed via the following methods.
71+
72+
* <https://groups.google.com/group/nodejs-sec>
73+
* <https://nodejs.org/en/blog/>
74+
75+
## Comments on this Policy
76+
77+
If you have suggestions on how this process could be improved please submit a
78+
[pull request](https://github.com/nodejs/nodejs.dev) or
79+
[file an issue](https://github.com/nodejs/security-wg/issues/new) to discuss.

gatsby-node.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ exports.createPages = ({ graphql, actions }) => {
2929
"privacy-policy"
3030
"about"
3131
"governance"
32+
"security"
3233
]
3334
}
3435
}

src/components/AboutPageSideNavBar/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export enum AboutPageKeys {
1313
resources = 'resources',
1414
trademark = 'trademark',
1515
privacy = 'privacy',
16+
security = 'security',
1617
}
1718

1819
const aboutPageSideNavBarItem: AboutPageSideNavBarItem[] = [
@@ -48,6 +49,10 @@ const aboutPageSideNavBarItem: AboutPageSideNavBarItem[] = [
4849
title: 'Privacy Policy',
4950
slug: AboutPageKeys.privacy,
5051
},
52+
{
53+
title: 'Security Reporting',
54+
slug: AboutPageKeys.security,
55+
},
5156
];
5257

5358
export default function AboutPageSideNavBar({

src/components/Footer/__tests__/__snapshots__/footer.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ exports[`Tests for Footer component renders correctly 1`] = `
4242
<li>
4343
<a
4444
class="footer__link"
45-
href="https://nodejs.org/en/security/"
45+
href="/security"
4646
>
4747
Security Reporting
4848
</a>

src/components/Footer/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ function Footer(): JSX.Element {
3636
</a>
3737
</li>
3838
<li>
39-
<a className="footer__link" href="https://nodejs.org/en/security/">
39+
<Link className="footer__link" to="/security">
4040
Security Reporting
41-
</a>
41+
</Link>
4242
</li>
4343
<li>
4444
<Link className="footer__link" to="/about">

src/components/Layout/__tests__/__snapshots__/centered-layout.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ exports[`CenteredLayout component renders correctly with footer 1`] = `
183183
<li>
184184
<a
185185
class="footer__link"
186-
href="https://nodejs.org/en/security/"
186+
href="/security"
187187
>
188188
Security Reporting
189189
</a>

src/components/Layout/__tests__/__snapshots__/page-layout.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ exports[`PageLayout component renders correctly with data 1`] = `
256256
<li>
257257
<a
258258
class="footer__link"
259-
href="https://nodejs.org/en/security/"
259+
href="/security"
260260
>
261261
Security Reporting
262262
</a>

src/pages/security.tsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import React from 'react';
2+
import { graphql } from 'gatsby';
3+
import { Page } from '../types';
4+
import Layout from '../components/Layout';
5+
import Article from '../components/Article';
6+
import Footer from '../components/Footer';
7+
import '../styles/article-reader.scss';
8+
import AboutPageSideNavBar, {
9+
AboutPageKeys,
10+
} from '../components/AboutPageSideNavBar';
11+
12+
export default function SecurityPage({ data }: Page): JSX.Element {
13+
const { title, description } = data.page.frontmatter;
14+
const { html, tableOfContents } = data.page;
15+
const { authors } = data.page.fields;
16+
return (
17+
<>
18+
<Layout title={title} description={description} showFooter={false}>
19+
<main className="streched-container">
20+
<AboutPageSideNavBar pageKey={AboutPageKeys.security} />
21+
<Article
22+
title={title}
23+
html={html}
24+
tableOfContents={tableOfContents}
25+
authors={authors}
26+
editPath="content/about/security.md"
27+
/>
28+
</main>
29+
</Layout>
30+
<Footer />
31+
</>
32+
);
33+
}
34+
35+
export const query = graphql`
36+
query {
37+
page: markdownRemark(fields: { slug: { eq: "security" } }) {
38+
html
39+
tableOfContents(absolute: false, pathToSlugField: "frontmatter.path")
40+
frontmatter {
41+
title
42+
description
43+
}
44+
fields {
45+
authors
46+
}
47+
}
48+
}
49+
`;

test/components/__snapshots__/aboutPageSideNavBar.test.tsx.snap

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ exports[`AboutPageSideNavBar renders correctly 1`] = `
7070
>
7171
Privacy Policy
7272
</a>
73+
<a
74+
class="t-body2 side-nav__item-community"
75+
href="/security"
76+
id="link-security"
77+
>
78+
Security Reporting
79+
</a>
7380
</ul>
7481
</nav>
7582
</div>
@@ -145,6 +152,13 @@ exports[`AboutPageSideNavBar should about Releases page exist and contain a href
145152
>
146153
Privacy Policy
147154
</a>
155+
<a
156+
class="t-body2 side-nav__item-community"
157+
href="/security"
158+
id="link-security"
159+
>
160+
Security Reporting
161+
</a>
148162
</ul>
149163
</nav>
150164
</div>

test/pages/__snapshots__/404.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ exports[`404 page renders correctly 1`] = `
200200
<li>
201201
<a
202202
class="footer__link"
203-
href="https://nodejs.org/en/security/"
203+
href="/security"
204204
>
205205
Security Reporting
206206
</a>

0 commit comments

Comments
 (0)