chore: add GitHub automation and fix rand vulnerability
Code Quality / quality-checks (push) Has been cancelled
Security Scan / security-audit (push) Has been cancelled

GitHub Actions:
- Add Dependabot for weekly dependency updates (cargo, github-actions)
- Add PR labeler workflow with file-based auto-labeling
- Add issue/PR templates (bug report, feature request, PR template)
- Fix release.yml artifact paths and labeler.yml config syntax
Security:
- Upgrade rand 0.8 → 0.10 to fix RUSTSEC-2026-0097 unsoundness
- Update screenshot.rs for rand 0.10 API (thread_rng → rng, gen_range → random_range)
This commit is contained in:
2026-04-11 18:18:41 +02:00
parent 7a0adc4d82
commit c6ec65c851
10 changed files with 379 additions and 46 deletions
+3 -3
View File
@@ -107,13 +107,13 @@ impl Screenshot {
.with_data(|src| data.copy_from_slice(src))
.unwrap();
use rand::Rng;
let mut rng = rand::thread_rng();
use rand::RngExt;
let mut rng = rand::rng();
for x in 0..width {
let mut melt_amount = 0.0;
for y in 0..height {
melt_amount += rng.gen_range(0.0..factor);
melt_amount += rng.random_range(0.0..factor);
let src_y = (y as f32 - melt_amount).max(0.0) as i32;
let src_idx = (src_y as usize * stride) + (x as usize * 4);