-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #4
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
Conversation
…t lead repository - Extract UpdateModifiedLeadTimestamps() method to eliminate DRY violation * Caches dateTimeProvider.UtcNow once to ensure transactional consistency * All modified entities in same transaction receive identical timestamp * Improves performance with early exit when no entities modified * Single source of truth for timestamp update logic - Implement LeadRepository with EF Core * SaveLeadAsync: Handles insert/update with automatic timestamp management * ExistsByCorrelationIdAsync: Optimized query for idempotency checks * GetByCorrelationIdAsync: Efficient correlation ID lookups * Automatic EF Core tracking conflict resolution * Full cancellation token support * Comprehensive input validation and exception handling - All 24 repository tests passing - All 9 DbContext tests passing (no regressions) - 175 total tests passing (100% pass rate) - Zero build warnings/errors This completes Step 4.3 and prepares infrastructure for Step 4.4 configuration settings.
…e and AWS - Implement DatabaseSettings configuration class * IOptions pattern for strongly-typed configuration * Properties: ConnectionString, Server, Port, Database, User, Password * Retry and timeout settings: MaxRetryAttempts, MaxRetryDelaySeconds, CommandTimeoutSeconds * Debug flags: EnableDetailedErrors, EnableQueryLogging * Comprehensive Validate() method with 13+ validation rules * Default values: Port=3306, MaxRetryAttempts=3, CommandTimeout=30s - Implement AwsSettings configuration class * IOptions pattern for AWS services configuration * Properties: Region, SqsQueueUrl, SqsDlqUrl, SecretsManagerSecretName, RdsEndpoint * IAM authentication support: UseIamDatabaseAuthentication, IamTokenLifetimeSeconds * Credential validation: ValidateCredentialsAtStartup flag * Comprehensive Validate() method with URL format and endpoint validation * Default values: MaxRetryAttempts=3, IamTokenLifetime=900s - 51 comprehensive unit tests * DatabaseSettingsTests: Valid/invalid values, port ranges, retry settings * AwsSettingsTests: Valid/invalid URLs, region variations, format validation * Edge case coverage: null handling, minimum values, boundary conditions * All 226 tests passing (100% pass rate) This completes Step 4.4 and provides production-ready configuration management following .NET best practices with the IOptions pattern.
…afe caching - Implement IDbConnectionStringProvider interface * Thread-safe singleton with lock-based synchronization * Initialize once during Lambda cold start * GetConnectionString for cached retrieval * Comprehensive error handling and validation
- Replace AWSSDK.SecretsManager with Cloudvelous.Aws.SecretsManager - Add Cloudvelous packages (Core, SecretsManager, RDS, SQS) v1.0.8 - Remove manual caching and JSON deserialization logic - Leverage Cloudvelous built-in caching (60min TTL) and retry policies - Create DatabaseCredentials immutable record for type-safe secret deserialization - Refactor SecretsManagerService to use ISecretsManagerClient - Simplify unit tests due to Cloudvelous SDK's optional parameter constraints - Update ISecretsManagerService interface with comprehensive XML documentation - Add 'where T : class' constraint to GetSecretAsync<T> for reference type safety Technical Details: - Cloudvelous SDK provides automatic caching with configurable TTL - Built-in retry policies using Polly (3 retries, exponential backoff) - Thread-safe operations using concurrent collections - Type-safe JSON deserialization with System.Text.Json
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 21798294 | Triggered | Generic Password | ee7e665 | tests/LeadProcessor.UnitTests/Infrastructure/Services/DbConnectionStringProviderTests.cs | 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 secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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.
Develop -> Main