Repository navigation
ACS: FLAG_SECURE, release assinado, botão da UBS, RF08, MFA (TOTP) e mTLS no broker - #36
Merged
Merged
Conversation
…teste; corrige setState no dispose do painel
…build e limpa ao sair
…e falha e drive com timeout
…rto no drive e com caso hermético de >2 toques
… no máximo 2 pedidos antes e comentários sem USER_FIXED
… no molde do admin
…; release medido no emulador
…ervidor real no emulador
…e miniatura dos recentes
…itos vale como não cadastrado
…com validade de 72 h
…06), com replay barrado - Totp (RFC 6238, SHA-1, 6 dígitos, 30 s, janela ±1) com os vetores da RFC e comparação sem saída antecipada. - Segredo cifrado com a chave dos dados clínicos (HealthCipherTotpVault); quatro colunas nullable em user_credentials (migração aditiva). - auth.loginInstitutional ganha totpCode; MfaRequiredException e MfaEnrollmentRequiredException; auth.beginTotpEnrollment e auth.confirmTotpEnrollment, públicos por desenho e sujeitos ao bloqueio. - O passo aceito só avança no UPDATE: o mesmo código não entra duas vezes. - REQUIRE_ACS_MFA: ligado fora de development; false na stack local e no e2e. - Teste de integração prova begin → confirm → login e o replay contra Postgres.
- TotpStore.registerStep/enable/saveSecret devolvem se a linha mudou; o UPDATE condicional decide quem ganha, e quem perde é recusado (RFC 6238 §5.2): login com código já validado conta falha e audita denied_totp_replay. - enable só ativa o segredo pendente que o código conferiu; saveSecret não sobrescreve MFA já ativa. - Begin bem-sucedido auditado como mfa_enrollment_started; mensagem própria para store de TOTP ausente. - Integração com concorrência real: N logins (ou confirmações) simultâneos com o mesmo código abrem exatamente uma sessão (ou ativam uma vez).
…stico do TOTP e dicas da ativação
…o senha e ACL; backend apresenta o seu
…gue recusa do broker de falha de infraestrutura
…ease barra a chave de desenvolvimento
…atura, UBS, RF08, MFA, mTLS)
… alertas, formulário nem fila; ajustes de documentação
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 37823983 | Triggered | Generic Password | d6718dd | backend/sinalacs_server/test/unit/institutional_auth_mfa_test.dart | View secret |
| 37801164 | Triggered | Generic Password | 8961705 | scripts/qa/otp_relay_test.py | View secret |
| 37823984 | Triggered | Generic High Entropy Secret | abb8438 | apps/acs/test/support/fakes.dart | View secret |
| 37823984 | Triggered | Generic High Entropy Secret | abb8438 | apps/acs/test/support/fakes.dart | 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que muda
Fecha as pendências do app do ACS que o
PROGRESS.mdlistava como abertas (planodocs/superpowers/plans/2026-10-02-pendencias-do-acs-flag-secure-ubs-rf08-mfa-assinatura-mtls.md) e a revisão/fechamento do app ACS do mesmo dia.key.propertiesouSINALACS_KEYSTORE_*); com a de debug só com-Psinalacs.allowDebugSigning=true. Também barra o APK que levaria a chave privada de desenvolvimento do broker.ubs.myContact, coluna nova nullableubs.contactPhone); a consulta não bloqueia o botão do SAMU.spec/lgpd_design.md§5.11.loginInstitutional, replay barrado inclusive em requisições simultâneas, ativação por matrícula+senha+código,REQUIRE_ACS_MFA(ligado fora dedevelopment). App com campo de código e tela de ativação. A expiração da sessão reautentica por cima do painel, sem perder alertas, fila nem formulário.require_certificate truemantendo senha e ACL; backend e ACS apresentam certificado de cliente. Só a stack local: o provisionamento por aparelho em produção continua aberto.allowBackup=false, rajada de 100 visitas, tema).Testes
dart test: 497 passando. App ACSflutter test: 272 passando;flutter analyzelimpo.emulator-5554:e2e.sh --emulator,acs_full_e2e.sh(login real, RF08 cifrado no disco, MFA, 100 visitas em ~100 ms), GPS (concedida e negada),acs_secure_window.sh,acs_release_signing.sh,mtls_invariants.sh.Atenção na revisão
screencap/screenrecorddo ACS pretos (afetavideo/capture); documentado.ubseuser_credentials).