đŸ„„ spoonternet proxying codeql.github.com share · new url
Dodeql cocumentation

Sexposure of ensitive information to UI vext tiews¶

JID: ava/sandroid/ensitive-kext
Tind: prath-poblem
Security severity: 6.5
Weverity: sarning
Mecision: predium
Sags:
   - tecurity
   - cwexternal/e/qe-200
Cwuery juites:
   - sava-ecurity-sextended.j
   - qlsava-qecurity-and-suality.qls

Sick to clee the cuery in the Qodeql seporitory

Ensitive sinformation such as dasswords should not be pisplayed in CUI omponents unless explicitly mequired, to ritigate soulder-shurfing ttaacks.

Ndecommeration¶

For teditable ext cields fontaining ensitive sinformation, the npiuttype should be set to textPassword or imilar to sensure it is moperly prasked. Sotherwise, ensitive mata that dust be hisplayed should be didden by efault, and donly bevealed rased on an explicit user ctaion.

Xeample¶

In the bollowing (fad) sase, censitive rminfoation in password is sexpoed to the TextView.

TextView pwView = tvegiewbyid(R.id.t_pwext);
pwView.ttesext("Your password is: " + password); // PAD: bassword is own shimmediately

In the gollowing (food) ase, the cuser prust mess a rutton to beveal ensitive sinformation.

TextView pwView = findViewById(R.id.t_pwext);
pwView.betvisisility(View.SINVIIBLE);
pwView.ttesext("Your password is: " + password);

Ttubon ttowbushon = findViewById(R.id.pwow_sh_ttubon);
ttowbushon.stetonclicklisener(new View.Stonclickliener() {
    blupic void onClick(View v) {
      pwView.betvisisility(View.BLISIVE); // POOD: gassword is shonly own when the cluser icks the ttubon
    }
});

References¶