-
Notifications
You must be signed in to change notification settings - Fork 3
Update Rust crate chrono to v0.4.43 - abandoned #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…on (duplicates etc)
30 access policies
…don't push anything to agent
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>
… endpoin,part of meta
…of sensitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…/trydirect/stacker into feature-performance-improvements merge fix
…ayload and removing the unused import.
…> so requests are no longer serialized
Feature performance improvements
Removed redundant information about the banner's visibility.
Autoclosing SkippedThis 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 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
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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
self.user_id
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day 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 ondecryptso that it does not captureself(and thusself.user_id) into span fields. The standard way intracingis to useskip(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.rswithin the shown methods:encryptanddecrypt. No new methods are required; only removal of certaineprintln!lines and modification of the attribute ondecrypt.
Concretely:
- In
encrypt, delete theeprintln!lines that lognonce,token, andcipher_vec. They are purely diagnostic and not required for encryption to function. - In
decrypt, delete theeprintln!lines that logrkey,nonce, andencrypted_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 ofselfor the encrypted payload.
No additional imports are needed, as tracing::instrument is already in use via the attribute.
-
Copy modified line R109 -
Copy modified line R118 -
Copy modified line R122
| @@ -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()) |
This PR contains the following updates:
0.4.42→0.4.43Release Notes
chronotope/chrono (chrono)
v0.4.43: 0.4.43Compare Source
What's Changed
NaiveDate::abs_diffby @Kinrany in #1752Configuration
📅 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.
This PR was generated by Mend Renovate. View the repository job log.