Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 19, 2026

This PR contains the following updates:

Package Type Update Change
chrono dependencies patch 0.4.420.4.43

Release Notes

chronotope/chrono (chrono)

v0.4.43: 0.4.43

Compare Source

What's Changed

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

smart--petea and others added 30 commits March 2, 2024 16:36
vsilent and others added 26 commits January 13, 2026 15:14
Problem:
Status Panel agents authenticate with 'agent' role but get 403
when accessing /api/v1/agent/commands/report endpoint.

Root Cause:
- Agent authentication (f_agent.rs) creates pseudo-user with role 'agent'
- Earlier migration (20251222160220) added agent permissions
- However, permissions may be missing on remote server

Solution:
- Create idempotent migration ensuring agent role has necessary permissions
- Grant 'agent' role access to:
  * POST /api/v1/agent/commands/report (command reporting)
  * GET /api/v1/agent/commands/wait/:deployment_hash (command polling)
- Ensure agent role inherits from group_anonymous

This allows Status Panel agents to report command results without
requiring per-agent Casbin rules, leveraging Vault token management
for authentication.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Removed redundant information about the banner's visibility.
@renovate renovate bot changed the title Update Rust crate chrono to v0.4.43 Update Rust crate chrono to v0.4.43 - abandoned Jan 19, 2026
@renovate
Copy link
Contributor Author

renovate bot commented Jan 19, 2026

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

@gitguardian
Copy link

gitguardian bot commented Jan 19, 2026

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
24149610 Triggered Bearer Token 0a8b589 src/connectors/admin_service/jwt.rs View secret
10008470 Triggered Generic High Entropy Secret d89fb33 tests/mock_data/deploy2.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Ok(cipher_vec)
}

#[tracing::instrument(name = "decrypt.")]

Check failure

Code scanning / CodeQL

Cleartext logging of sensitive information High

This operation writes
self.user_id
to a log file.

Copilot Autofix

AI about 17 hours ago

In general, to fix cleartext logging of sensitive information, avoid logging the sensitive value entirely, or, if absolutely necessary, log only non-sensitive metadata or a redacted/hashed form. For tracing spans, configure instrumentation so that self and any sensitive arguments are not automatically recorded.

For this specific code:

  • Remove or sanitize the explicit debug prints that include rkey, the nonce, the token, and the encrypted data, because all of these relate to sensitive crypto operations and identifiers.
  • Adjust the #[tracing::instrument] annotation on decrypt so that it does not capture self (and thus self.user_id) into span fields. The standard way in tracing is to use skip(self, encrypted_data) on the attribute, which preserves the span for observability but omits the sensitive data.
  • These changes can be confined to src/helpers/cloud/security.rs within the shown methods: encrypt and decrypt. No new methods are required; only removal of certain eprintln! lines and modification of the attribute on decrypt.

Concretely:

  • In encrypt, delete the eprintln! lines that log nonce, token, and cipher_vec. They are purely diagnostic and not required for encryption to function.
  • In decrypt, delete the eprintln! lines that log rkey, nonce, and encrypted_data.
  • Change the #[tracing::instrument(name = "decrypt.")] line to #[tracing::instrument(name = "decrypt.", skip(self, encrypted_data))] so that the span is created without automatically logging the contents of self or the encrypted payload.

No additional imports are needed, as tracing::instrument is already in use via the attribute.

Suggested changeset 1
src/helpers/cloud/security.rs

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/helpers/cloud/security.rs b/src/helpers/cloud/security.rs
--- a/src/helpers/cloud/security.rs
+++ b/src/helpers/cloud/security.rs
@@ -94,10 +94,8 @@
         let cipher = Aes256Gcm::new(&key);
         // eprintln!("encrypt: Cipher str {cipher:?}");
         let nonce = Aes256Gcm::generate_nonce(&mut OsRng); // 96-bits; unique per message
-        eprintln!("Nonce bytes {nonce:?}");
         // let nonce_b64: String = general_purpose::STANDARD.encode(nonce);
         // eprintln!("Nonce b64 {nonce_b64:?}");
-        eprintln!("token {token:?}");
 
         let cipher_vec = cipher
             .encrypt(&nonce, token.as_ref())
@@ -107,11 +103,10 @@
         // self.save(cipher_vec.clone());
         self.save(nonce.as_slice());
 
-        eprintln!("Cipher {cipher_vec:?}");
         Ok(cipher_vec)
     }
 
-    #[tracing::instrument(name = "decrypt.")]
+    #[tracing::instrument(name = "decrypt.", skip(self, encrypted_data))]
     pub fn decrypt(&mut self, encrypted_data: Vec<u8>) -> Result<String, String> {
         let sec_key = std::env::var("SECURITY_KEY")
             .expect("SECURITY_KEY environment variable is not set")
@@ -119,16 +111,15 @@
         let key: &Key<Aes256Gcm> = Key::<Aes256Gcm>::from_slice(&sec_key.as_bytes());
         // eprintln!("decrypt: Key str {key:?}");
         let rkey = format!("{}_{}_{}", self.user_id, self.provider, self.field);
-        eprintln!("decrypt: Key str {rkey:?}");
         self.get(rkey);
         // eprintln!("decrypt: nonce b64:decoded {nonce:?}");
 
         let nonce = Nonce::from_slice(self.nonce.as_slice());
-        eprintln!("decrypt: nonce {nonce:?}");
+        // eprintln!("decrypt: nonce {nonce:?}");
 
         let cipher = Aes256Gcm::new(&key);
         // eprintln!("decrypt: Cipher str {cipher:?}");
-        eprintln!("decrypt: str {encrypted_data:?}");
+        // eprintln!("decrypt: str {encrypted_data:?}");
 
         let plaintext = cipher
             .decrypt(&nonce, encrypted_data.as_ref())
EOF
@@ -94,10 +94,8 @@
let cipher = Aes256Gcm::new(&key);
// eprintln!("encrypt: Cipher str {cipher:?}");
let nonce = Aes256Gcm::generate_nonce(&mut OsRng); // 96-bits; unique per message
eprintln!("Nonce bytes {nonce:?}");
// let nonce_b64: String = general_purpose::STANDARD.encode(nonce);
// eprintln!("Nonce b64 {nonce_b64:?}");
eprintln!("token {token:?}");

let cipher_vec = cipher
.encrypt(&nonce, token.as_ref())
@@ -107,11 +103,10 @@
// self.save(cipher_vec.clone());
self.save(nonce.as_slice());

eprintln!("Cipher {cipher_vec:?}");
Ok(cipher_vec)
}

#[tracing::instrument(name = "decrypt.")]
#[tracing::instrument(name = "decrypt.", skip(self, encrypted_data))]
pub fn decrypt(&mut self, encrypted_data: Vec<u8>) -> Result<String, String> {
let sec_key = std::env::var("SECURITY_KEY")
.expect("SECURITY_KEY environment variable is not set")
@@ -119,16 +111,15 @@
let key: &Key<Aes256Gcm> = Key::<Aes256Gcm>::from_slice(&sec_key.as_bytes());
// eprintln!("decrypt: Key str {key:?}");
let rkey = format!("{}_{}_{}", self.user_id, self.provider, self.field);
eprintln!("decrypt: Key str {rkey:?}");
self.get(rkey);
// eprintln!("decrypt: nonce b64:decoded {nonce:?}");

let nonce = Nonce::from_slice(self.nonce.as_slice());
eprintln!("decrypt: nonce {nonce:?}");
// eprintln!("decrypt: nonce {nonce:?}");

let cipher = Aes256Gcm::new(&key);
// eprintln!("decrypt: Cipher str {cipher:?}");
eprintln!("decrypt: str {encrypted_data:?}");
// eprintln!("decrypt: str {encrypted_data:?}");

let plaintext = cipher
.decrypt(&nonce, encrypted_data.as_ref())
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants