修复验收:修正最终验收证据问题
This commit is contained in:
1 parent
a2941c4d7b
commit
0c380bdfdf
14 files changed
+592
-119
No files matched your search
@@ -43,9 +43,12 @@ def backend_login(env):
|
||||
captcha_res = requests.get(f"{BACKEND_URL}/captchaImage").json()
|
||||
uuid = captcha_res['uuid']
|
||||
code = get_captcha_code_from_redis(uuid)
|
||||
password = env.get('QA_ADMIN_PASSWORD')
|
||||
if not password:
|
||||
raise RuntimeError("QA_ADMIN_PASSWORD is required and must be configured in environment or ~/.railwaysystem-qa.env")
|
||||
login_res = requests.post(f"{BACKEND_URL}/login", json={
|
||||
'username': env.get('QA_ADMIN_USERNAME', 'admin'),
|
||||
'password': env.get('QA_ADMIN_PASSWORD', 'admin123'),
|
||||
'password': password,
|
||||
'code': code,
|
||||
'uuid': uuid
|
||||
}).json()
|
||||
@@ -171,7 +174,9 @@ class Round3ARunner:
|
||||
uuid = last_uuid[0]
|
||||
code = get_captcha_code_from_redis(uuid)
|
||||
username = self.env.get('QA_ADMIN_USERNAME', 'admin')
|
||||
password = self.env.get('QA_ADMIN_PASSWORD', 'admin123')
|
||||
password = self.env.get('QA_ADMIN_PASSWORD')
|
||||
if not password:
|
||||
raise RuntimeError("QA_ADMIN_PASSWORD is required and must be configured in environment or ~/.railwaysystem-qa.env")
|
||||
|
||||
page.fill('input[placeholder="账号"]', username)
|
||||
page.fill('input[placeholder="密码"]', password)
|
||||
@@ -563,7 +568,8 @@ class Round3ARunner:
|
||||
}""")
|
||||
for k, v in storage_data['localStorage'].items():
|
||||
if k not in ['username', 'rememberMe', 'sidebarStatus']:
|
||||
assert 'password' not in str(v).lower() or 'admin123' not in str(v), f"Plaintext secret found in localStorage key {k}"
|
||||
if self.env.get('QA_ADMIN_PASSWORD'):
|
||||
assert self.env.get('QA_ADMIN_PASSWORD').lower() not in str(v).lower(), f"Plaintext secret found in localStorage key {k}"
|
||||
self.log("Browser Storage Zero-Plaintext Audit: PASS (0 plaintext credentials stored)")
|
||||
|
||||
# 2. Database Validation
|
||||
|
||||
Reference in new issue
Block a user