From c6831877b452b5e7631ad2baec3d96b199003017 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 26 Dec 2022 00:10:35 +0000 Subject: ... use actual tokens --- src/ci_driver.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ci_driver.rs b/src/ci_driver.rs index 9ec0dd8..94e55a0 100644 --- a/src/ci_driver.rs +++ b/src/ci_driver.rs @@ -1,4 +1,6 @@ use std::process::Command; +use std::io::Read; +use serde_derive::{Deserialize, Serialize}; use futures_util::StreamExt; use std::fmt; use std::path::{Path, PathBuf}; @@ -126,7 +128,13 @@ fn random_name() -> String { } fn token_for_job() -> String { - "very secret token do not share".to_string() + let mut data = [0u8; 32]; + std::fs::File::open("/dev/urandom") + .unwrap() + .read_exact(&mut data) + .unwrap(); + + base64::encode(data) } struct ClientJob { -- cgit v1.1