Skip to content

Commit a35ec8f

Browse files
authored
Merge pull request #8791 from carols10cents/our-very-own-security-policy
Add a crates.io-specific security page
2 parents 92ff8bc + abe4fbc commit a35ec8f

File tree

5 files changed

+77
-13
lines changed

5 files changed

+77
-13
lines changed

app/components/footer.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<h1>Policies</h1>
2424
<ul role="list">
2525
<li><LinkTo @route="policies">Usage Policy</LinkTo></li>
26-
<li><a href="https://www.rust-lang.org/policies/security">Security</a></li>
26+
<li><LinkTo @route="policies.security">Security</LinkTo></li>
2727
<li><a href="https://foundation.rust-lang.org/policies/privacy-policy/">Privacy Policy</a></li>
2828
<li><a href="https://www.rust-lang.org/policies/code-of-conduct">Code of Conduct</a></li>
2929
<li><LinkTo @route="data-access">Data Access</LinkTo></li>

app/router.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ Router.map(function () {
5151
});
5252
this.route('category-slugs', { path: 'category_slugs' });
5353
this.route('team', { path: '/teams/:team_id' });
54-
this.route('policies');
54+
this.route('policies', function () {
55+
this.route('security');
56+
});
57+
// The canonical security page is `/policies/security`; this is a redirect to support guessing
58+
// of the URL to be `/security`.
59+
this.route('security');
5560
this.route('data-access');
5661
this.route('confirm', { path: '/confirm/:email_token' });
5762
this.route('accept-invite', { path: '/accept-invite/:token' });

app/routes/security.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Route from '@ember/routing/route';
2+
import { inject as service } from '@ember/service';
3+
4+
export default class SecurityRoute extends Route {
5+
@service router;
6+
7+
redirect() {
8+
this.router.replaceWith('policies.security');
9+
}
10+
}

app/templates/policies.hbs renamed to app/templates/policies/index.hbs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,7 @@
102102

103103
<h2 id='security'>Security</h2>
104104

105-
<p>Safety is one of the core principles of Rust, and to that end, we would like to ensure that cargo and crates.io have
106-
secure implementations. To learn more about disclosing security vulnerabilities for these tools, please reference the
107-
<a href='https://www.rust-lang.org/policies/security'>Rust Security policy</a>
108-
for more details.</p>
109-
110-
<p>Note that this policy only applies to official Rust projects like crates.io and cargo, and not individual crates. The
111-
crates.io team and the Security Response working group are not responsible for the disclosure of vulnerabilities to
112-
specific crates, and if any issues are found, you should seek guidance from the individual crate owners and their
113-
specific policies instead.</p>
114-
115-
<p>Thank you for taking the time to responsibly disclose any issues you find.</p>
105+
<p>Please see the <LinkTo @route="policies.security">Security page</LinkTo>.</p>
116106

117107
<h2 id='sexually-obscene-content'>Sexually Obscene Content</h2>
118108

@@ -150,6 +140,10 @@
150140
actions taken by the crates.io team. Account suspension may be lifted at the team's discretion however, for
151141
example in the case of someone's account being compromised.</p>
152142

143+
<h2 id='reporting'>Reporting</h2>
144+
145+
<p>Please report violations of this policy to <a href="mailto:[email protected]">[email protected]</a>.</p>
146+
153147
<h2 id='credits-license'>Credits &amp; License</h2>
154148

155149
<p>This policy is partially based on

app/templates/policies/security.hbs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<PageHeader @title='Security Information' />
2+
3+
<TextContent @boxed={{true}}>
4+
5+
<h2 id='crates-io-security'>Security of crates.io itself</h2>
6+
7+
<p>Safety is one of the core principles of Rust, and to that end, we would like to ensure that cargo, crates.io, docs.rs, and
8+
related tools have secure implementations. To disclose security vulnerabilities in the crates.io service itself (as opposed
9+
to crates hosted on crates.io) or any other <a href='https://github.com/rust-lang'>repository in the rust-lang
10+
organization</a>, please follow the <a href='https://www.rust-lang.org/policies/security'>Rust Security policy</a>.</p>
11+
12+
<p>Thank you for taking the time to responsibly disclose any issues you find.</p>
13+
14+
<h2 id='crate-security'>Security of crates hosted on crates.io</h2>
15+
16+
<p>To disclose security vulnerabilities found in a crate that is hosted on crates.io, seek guidance from the individual crate's
17+
owners and their specific policies. Commonly, projects include a file named <code>SECURITY.md</code> that contains the
18+
crate's security policies and procedures.</p>
19+
20+
<p>Intentionally malicious code is against <LinkTo @route="policies">crates.io's usage policies</LinkTo>; please report crates
21+
violating these policies to <a href="mailto:[email protected]">[email protected]</a>.</p>
22+
23+
<h2 id='rustsec'>Rustsec Security Advisory Database for receiving security updates</h2>
24+
25+
<p>The <a href="https://rustsec.org/">Rustsec Security Advisory Database</a> maintains advisories about vulnerabilities in
26+
crates published on crates.io. Maintained by the <a href="https://www.rust-lang.org/governance/wgs/wg-secure-code">Secure
27+
Code Working Group</a>, the information is available in a variety of forms to incorporate into your development practices.
28+
See <a href="https://rustsec.org/contributing.html">their steps to submit a vulnerability to the database</a>.</p>
29+
30+
<h2 id='ecosystem-security-help'>Ecosystem security help for crate authors</h2>
31+
32+
<p>Security is a value important to the Rust ecosystem as a whole, not just to the Rust language. If you are a crate author and
33+
you have received a high impact/severity security bug report for your crate, the Rust Foundation and the Rust Project are
34+
available to help manage the situation. The Rust Project or the Rust Foundation may also be the ones reaching out to you, if
35+
they have been informed of a security issue.</p>
36+
37+
<p>As part of its <a href="https://foundation.rust-lang.org/tags/security%20initiative/">Security Initiative</a>, the Rust
38+
Foundation:</p>
39+
40+
<ul>
41+
<li>Employs security engineers who can help assessing the problem, developing mitigations, and estimating impact.</li>
42+
<li>Has a network of member organizations that can help with testing resources and also employ security experts who can help
43+
with assessing and fixing issues.</li>
44+
<li>Employs communications staff who can manage publishing notifications and fielding inquiries.</li>
45+
<li>Has contacts with government agencies tasked with cybersecurity protections who may have information on exploitation or
46+
impact of a security problem.</li>
47+
</ul>
48+
49+
<p>The Rust Project can coordinate actions among other parts of the ecosystem that may need to be updated to address a fix.</p>
50+
51+
<p>Please reach out to <a href="mailto:[email protected]">[email protected]</a> if either the Rust Project or
52+
the Rust Foundation can help you by providing security support in the areas listed above or in another way! These are just a
53+
few examples of the kind of help available to crate authors facing security challenges.</p>
54+
55+
</TextContent>

0 commit comments

Comments
 (0)