fix(security): nosec on correct line for bandit B324
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1574h22m38s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1574h22m41s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1574h22m41s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1574h22m43s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1574h22m43s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1574h54m16s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped

This commit is contained in:
2026-07-13 00:59:05 +08:00
parent 0b002ce50d
commit b6ebee7574
@@ -85,7 +85,7 @@ class FeatureFlagConfig:
# 基于 identifier 做哈希取模,确保同一用户始终落在同一侧
if identifier:
hash_val = int(
hashlib.md5(f"{self.name}:{identifier}".encode("utf-8")).hexdigest(), 16
hashlib.md5(f"{self.name}:{identifier}".encode("utf-8")).hexdigest(), 16 # nosec B324
) # nosec B324 - 用于哈希取模做百分比切流,非安全用途
return (hash_val % 100) < self.percentage