Skip to content

Instantly share code, notes, and snippets.

@dennythecoder
Created August 4, 2021 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennythecoder/c1a4149d9eb277ddcdba641dc2d5214f to your computer and use it in GitHub Desktop.
Save dennythecoder/c1a4149d9eb277ddcdba641dc2d5214f to your computer and use it in GitHub Desktop.
Generic DoD Banner Popup Per Session for Webpage using JavaScript
(function(){
var hasAgreed = sessionStorage.getItem("has-agreed");
if(!hasAgreed){
var txt = ["You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.",
"By using this IS (which includes any device attached to this IS), you consent to the following conditions:",
" - The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.",
" - At any time, the USG may inspect and seize data stored on this IS.",
" - Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.",
" - This IS includes security measures (e.g., authentication and access controls) to protect USG interests—not for your personal benefit or privacy.",
" - Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details."].join("\n");
alert(txt);
sessionStorage.setItem('has-agreed',1);
}
})();
@dennythecoder
Copy link
Author

dennythecoder commented Aug 4, 2021

V-76891 | IISW-SI-000264 | SV-91587r1_rule

A consent banner will be in place to make prospective entrants aware that the website they are about to enter is a DoD web site and their activity is subject to monitoring. The document, DoDI 8500.01, establishes the policy on the use of DoD information systems. It requires the use of a standard Notice and Consent Banner and standard text to be included in user agreements. The requirement for the banner is for websites with security and access controls. These are restricted and not publicly accessible. If the website does not require authentication/authorization for use, then the banner does not need to be present. A manual check of the document root directory for a banner page file (such as banner.html) or navigation to the website via a browser can be used to confirm the information provided from interviewing the web staff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment