Skip to content

Commit 73a9eb8

Browse files
authored
Merge pull request #2177 from rust-lang/master
Deploy to production
2 parents 83f53f7 + baa8db4 commit 73a9eb8

File tree

9 files changed

+35
-121
lines changed

9 files changed

+35
-121
lines changed

locales/core.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
-security-at-rust-lang-org-anchor = { EMAIL("[email protected]") }
22
-rust-security-team-key-href =
33
/static/keys/rust-security-team-key.gpg.ascii
4-
-rust-pgp-key-mit-keyserver-href =
5-
https://pgp.mit.edu/pks/lookup?op=vindex&search=0xEFB9860AE7520DAC"
64
-wikipedia-rfpolicy-href =
75
https://en.wikipedia.org/wiki/RFPolicy
86
@@ -20,6 +18,8 @@
2018
https://groups.google.com/forum/#!forum/rustlang-security-announcements
2119
-rust-security-announcements-mailing-list-href =
2220
https://groups.google.com/group/rustlang-security-announcements/subscribe
21+
-rust-security-supported-channels-href =
22+
https://doc.rust-lang.org/book/appendix-07-nightly-rust.html
2323
-rustlang-security-announcements-subscribe-anchor =
2424
2525
-distros-openwall-email-anchor =

locales/en-US/security.ftl

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ policies-security-page-title = Security policy
55
66
security-reporting-heading = Reporting
77
security-reporting-link = email { ENGLISH("[email protected]") }
8-
security-reporting-description--2022-01 =
8+
security-reporting-description--2025-07 =
99
<p>Safety is one of the core principles of Rust, and to that end, we would like to ensure that Rust has a secure implementation. Thank you for taking the time to responsibly disclose any issues you find.</p>
10-
<p>All security bugs in the Rust distribution should be reported by email to { -security-at-rust-lang-org-anchor }. This list is delivered to a small security team. Your email will be acknowledged within 24 hours, and you’ll receive a more detailed response to your email within 48 hours indicating the next steps in handling your report. If you would like, you can encrypt your report using <a href="{ -rust-security-team-key-href }">our public key</a>. This key is also <a href="{ -rust-pgp-key-mit-keyserver-href }">On MIT’s keyserver</a> and <a href="#security-pgp-key">reproduced below</a>.</p>
10+
<p>All security bugs in the Rust distribution should be reported by email to { -security-at-rust-lang-org-anchor }. This list is delivered to a small security team. Your email will be acknowledged within 24 hours, and you’ll receive a more detailed response to your email within 48 hours indicating the next steps in handling your report.</p>
1111
<p>This email address receives a large amount of spam, so be sure to use a descriptive subject line to avoid having your report be missed. After the initial reply to your report, the security team will endeavor to keep you informed of the progress being made towards a fix and full announcement. As recommended by <a href="{ -wikipedia-rfpolicy-href }">RFPolicy</a>, these updates will be sent at least every five days. In reality, this is more likely to be every 24-48 hours.</p>
1212
<p>If you have not received a reply to your email within 48 hours, or have not heard from the security team for the past five days, there are a few steps you can take (in order):</p>
1313
<ul>
@@ -63,20 +63,19 @@ security-scope--2025-04 =
6363
<p>If you have doubts on whether something falls within our scope, <a href="mailto:[email protected]">please reach out</a> and we will provide guidance.</p>
6464
6565
security-disclosure-heading = Disclosure policy
66-
security-disclosure-description =
66+
security-disclosure-description--2025-07 =
6767
<p>The Rust project has a 5 step disclosure process.</p>
6868
<ol>
6969
<li>The security report is received and is assigned a primary handler. This person will coordinate the fix and release process.</li>
70-
<li>The problem is confirmed and a list of all affected versions is determined.</li>
70+
<li>The problem is confirmed, the affected versions are identified, and relevant domain experts from relevant Rust teams are involved.</li>
7171
<li>Code is audited to find any potential similar problems.</li>
72-
<li>Fixes are prepared for all releases which are still under maintenance. These fixes are not committed to the public repository but rather held locally pending the announcement.</li>
73-
<li>On the embargo date, the <a href="{ -rustlang-security-announcements-google-groups-forum-href }"> Rust security mailing list</a> is sent a copy of the announcement. The changes are pushed to the public repository and new builds are deployed to rust-lang.org. Within 6 hours of the mailing list being notified, a copy of the advisory will be published on the Rust blog.</li>
72+
<li>Fixes are prepared for all supported release branches, and a CVE number is reserved. These fixes are not committed to the public repository but rather held in private repositories pending the announcement. These fixes are reviewed privately using the same review process of public changes.</li>
73+
<li>On the embargo date, a copy of the announcement is sent to the <a href="{ -rustlang-security-announcements-google-groups-forum-href }"> Rust security mailing list</a> and posted on the Rust blog. The changes are pushed to the public repository and the release process is started. Within an hour, full details are published in the CVE database</li>
7474
</ol>
7575
<p>This process can take some time, especially when coordination is required with maintainers of other projects. Every effort will be made to handle the bug in as timely a manner as possible, however it’s important that we follow the release process above to ensure that the disclosure is handled in a consistent manner.</p>
7676
7777
security-receiving-heading = Receiving security updates
78-
security-receiving-description =
79-
<p>The best way to receive all the security announcements is to subscribe to the <a href="{ -rust-security-announcements-mailing-list-href }">Rust security announcements mailing list</a> (alternatively by sending an email to { -rustlang-security-announcements-subscribe-anchor }). The mailing list is very low traffic, and it receives the public notifications the moment the embargo is lifted.</p>
80-
<p>We will announce vulnerabilities 72 hours before the embargo is lifted to { -distros-openwall-email-anchor }, so that Linux distributions can update their packages.</p>
81-
82-
security-pgp-key-heading = Plaintext PGP key
78+
security-receiving-description--2025-07 =
79+
<p>The best way to receive all the security announcements is to subscribe to the <a href="{ -rust-security-announcements-mailing-list-href }">Rust security announcements mailing list</a> (alternatively by sending an email to { -rustlang-security-announcements-subscribe-anchor }). The mailing list is very low traffic, and it receives the public notifications the moment the embargo is lifted. Announcements on the mailing list are signed with the <a href="{{ -rust-security-team-key-href }}">Rust's security key</a>.</p>
80+
<p>The Rust project only provides support and security updates for the most recent stable release and the latest releases in our <a href="{ -rust-security-supported-channels-href }">beta and nightly channels</a>. As Rust releases must be built in the public, we will begin the release process as soon as the embargo lifts, and a release blog post will be published once updated binaries are available for download.</p>
81+
<p>When a vulnerability affects software distributions, we will announce vulnerabilities 72 hours before the embargo is lifted to { -distros-openwall-email-anchor }, so that distributions can update their packages when the embargo lifts.</p>

src/category.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'r> FromParam<'r> for Category {
3131
if is_category(&url) {
3232
Ok(Category { name: url })
3333
} else {
34-
Err(format!("No category called <{}>", url))
34+
Err(format!("No category called <{url}>"))
3535
}
3636
}
3737
}

src/i18n.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn add_bundle_functions(bundle: &mut FluentBundle<&'static FluentResource>) {
2222
Some(FluentValue::String(s)) => s,
2323
_ => return FluentValue::None,
2424
};
25-
FluentValue::String(format!("<a href='mailto:{0}' lang='en-US'>{0}</a>", email).into())
25+
FluentValue::String(format!("<a href='mailto:{email}' lang='en-US'>{email}</a>").into())
2626
})
2727
.expect("could not add function");
2828

@@ -32,7 +32,7 @@ fn add_bundle_functions(bundle: &mut FluentBundle<&'static FluentResource>) {
3232
Some(FluentValue::String(s)) => s,
3333
_ => return FluentValue::None,
3434
};
35-
FluentValue::String(format!("<span lang='en-US'>{0}</span>", text).into())
35+
FluentValue::String(format!("<span lang='en-US'>{text}</span>").into())
3636
})
3737
.expect("could not add function");
3838
}

src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ fn baseurl(lang: &str) -> String {
125125
if lang == "en-US" {
126126
String::new()
127127
} else {
128-
format!("/{}", lang)
128+
format!("/{lang}")
129129
}
130130
}
131131

@@ -274,13 +274,13 @@ fn hash_css(css: &str) -> String {
274274
}
275275

276276
fn compile_sass(filename: &str) -> String {
277-
let scss_file = format!("./src/styles/{}.scss", filename);
277+
let scss_file = format!("./src/styles/{filename}.scss");
278278

279279
let css = compile_file(&scss_file, Options::default())
280280
.unwrap_or_else(|_| panic!("couldn't compile sass: {}", &scss_file));
281281

282282
let css_sha = format!("{}_{}", filename, hash_css(&css));
283-
let css_file = format!("./static/styles/{}.css", css_sha);
283+
let css_file = format!("./static/styles/{css_sha}.css");
284284

285285
fs::write(&css_file, css.into_bytes())
286286
.unwrap_or_else(|_| panic!("couldn't write css file: {}", &css_file));
@@ -291,7 +291,7 @@ fn compile_sass(filename: &str) -> String {
291291
fn concat_vendor_css(files: Vec<&str>) -> String {
292292
let mut concatted = String::new();
293293
for filestem in files {
294-
let vendor_path = format!("./static/styles/{}.css", filestem);
294+
let vendor_path = format!("./static/styles/{filestem}.css");
295295
let contents = fs::read_to_string(vendor_path).expect("couldn't read vendor css");
296296
concatted.push_str(&contents);
297297
}
@@ -307,7 +307,7 @@ fn concat_vendor_css(files: Vec<&str>) -> String {
307307
fn concat_app_js(files: Vec<&str>) -> String {
308308
let mut concatted = String::new();
309309
for filestem in files {
310-
let vendor_path = format!("./static/scripts/{}.js", filestem);
310+
let vendor_path = format!("./static/scripts/{filestem}.js");
311311
let contents = fs::read_to_string(vendor_path).expect("couldn't read app js");
312312
concatted.push_str(&contents);
313313
}
@@ -354,7 +354,7 @@ async fn render_governance(
354354
Ok(Template::render(page, context))
355355
}
356356
Err(err) => {
357-
eprintln!("error while loading the governance page: {}", err);
357+
eprintln!("error while loading the governance page: {err}");
358358
Err(Status::InternalServerError)
359359
}
360360
}
@@ -377,7 +377,7 @@ async fn render_team(
377377
if err.is::<teams::TeamNotFound>() {
378378
Err(Status::NotFound)
379379
} else {
380-
eprintln!("error while loading the team page: {}", err);
380+
eprintln!("error while loading the team page: {err}");
381381
Err(Status::InternalServerError)
382382
}
383383
}
@@ -392,7 +392,7 @@ fn render_subject(category: Category, subject: &str, lang: String) -> Result<Tem
392392
// To work around the problem we check whether the template exists beforehand.
393393
let path = Path::new("templates")
394394
.join(category.name())
395-
.join(format!("{}.html.hbs", subject));
395+
.join(format!("{subject}.html.hbs"));
396396
if !path.is_file() {
397397
return Err(Status::NotFound);
398398
}

src/redirect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ pub(crate) fn maybe_redirect(path: Path) -> Option<Redirect> {
121121
if let Some((_, dest)) = EXTERNAL_REDIRECTS.iter().find(|(src, _)| *src == path) {
122122
Some(Redirect::permanent(*dest))
123123
} else if let Some((_, dest)) = PAGE_REDIRECTS.iter().find(|(src, _)| *src == path) {
124-
let dest = format!("/{}", dest);
124+
let dest = format!("/{dest}");
125125
match locale {
126126
Locale::Present("en-US") | Locale::NotSpecified => Some(Redirect::permanent(dest)),
127-
Locale::Present(locale) => Some(Redirect::permanent(format!("/{}{}", locale, dest))),
127+
Locale::Present(locale) => Some(Redirect::permanent(format!("/{locale}{dest}"))),
128128
Locale::SpecifiedButMissing => Some(Redirect::temporary(dest)),
129129
}
130130
} else {

src/teams.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl Cached for RustTeams {
254254
self.1
255255
}
256256
async fn fetch() -> Result<Self, Box<dyn Error + Send + Sync>> {
257-
let resp: Teams = reqwest::get(format!("{}/teams.json", BASE_URL))
257+
let resp: Teams = reqwest::get(format!("{BASE_URL}/teams.json"))
258258
.await?
259259
.error_for_status()?
260260
.json()
@@ -332,8 +332,8 @@ mod tests {
332332
],
333333
alumni: Vec::new(),
334334
website_data: Some(TeamWebsite {
335-
name: format!("Team {}", name),
336-
description: format!("Description of {}", name),
335+
name: format!("Team {name}"),
336+
description: format!("Description of {name}"),
337337
page: name.into(),
338338
email: None,
339339
repo: None,

templates/components/footer.html.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
<h4>{{fluent "footer-social"}}</h4>
3535
<div class="flex flex-row flex-wrap items-center">
3636
<a rel="me" href="https://social.rust-lang.org/@rust" target="_blank"><img src="/static/images/mastodon.svg"
37-
alt="{{fluent " mastodon"}}" title="{{fluent " mastodon"}}" /></a>
37+
alt="{{fluent "mastodon"}}" title="{{fluent "mastodon"}}" /></a>
3838
<a rel="me" href="https://bsky.app/profile/rust-lang.org" target="_blank"><img
39-
src="/static/images/bluesky.svg" alt="{{fluent " bluesky"}}" title="{{fluent " bluesky"}}" /></a>
39+
src="/static/images/bluesky.svg" alt="{{fluent "bluesky"}}" title="{{fluent "bluesky"}}" /></a>
4040
<a href="https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA" target="_blank"><img class="pv2"
41-
src="/static/images/youtube.svg" alt="{{fluent " footer-alt-youtube"}}" title="YouTube" /></a>
41+
src="/static/images/youtube.svg" alt="{{fluent "footer-alt-youtube"}}" title="YouTube" /></a>
4242
<a href="https://github.com/rust-lang" target="_blank"><img src="/static/images/github.svg" alt="github logo"
43-
title="{{fluent " footer-github-alt"}}" /></a>
43+
title="{{fluent "footer-github-alt"}}" /></a>
4444
</div>
4545
</div>
4646

0 commit comments

Comments
 (0)