Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 19 additions & 26 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
about: Report a functional PowerShell-script bug using synthetic, redacted examples
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Security vulnerabilities**
Do not disclose vulnerability details, credentials or private reports here.
Follow [SECURITY.md](https://github.com/SecopsEngineer/PowerShell/security/policy)
for private reporting and the details-free fallback if that channel is unavailable.

**Expected behavior**
A clear and concise description of what you expected to happen.
**Affected script and commit**
Script path and the exact commit SHA you ran.

**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment**
- Operating system:
- PowerShell version and edition:
- Relevant module names and versions:

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**What happened?**
Describe expected and observed behavior.

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Minimal reproduction**
Include the command and minimal synthetic input. Replace real identities, hosts,
tenants and organization data. Never include passwords, tokens, private keys,
browser histories or unredacted screenshots/exports.

**Additional context**
Add any other context about the problem here.
**Error output**
Paste only the relevant redacted error and state whether it reproduces on main.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Security vulnerability reporting
url: https://github.com/SecopsEngineer/PowerShell/security/policy
about: Read the private reporting policy; do not disclose vulnerability details in public issues.
6 changes: 6 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Contributor Covenant v2.0 is provided under Creative Commons Attribution 4.0
International: https://creativecommons.org/licenses/by/4.0/legalcode.
This adaptation replaces the generic enforcement-contact placeholder with
repository-maintainer contact guidance. See [THIRD_PARTY.md](THIRD_PARTY.md)
for the historical upstream license reference.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@ any additional non-production integration validation and its limits in the PR.

Preserve author/source attribution. Confirm redistribution terms before adding
third-party code. Never include real report exports, browser history or secrets.

## Vulnerability reports

Follow [SECURITY.md](SECURITY.md) rather than opening a public vulnerability issue
or pull request. Public bug reports must use synthetic examples and redact private
data. Do not submit a test vulnerability simply to check the reporting button.

## Source and license evidence

For imported or adapted material, provide its source URL and immutable revision,
author/rights-holder notice, license or written permission, and a description of
local modifications. Update [THIRD_PARTY.md](THIRD_PARTY.md) and preserve required
texts in `LICENSES/`. Public availability is not evidence of permission to copy.
Do not add material with unclear terms or remove existing attribution.
6 changes: 6 additions & 0 deletions Get-BrowserHistory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ IE TypedURLs is not a complete history source and is no longer collected.
-AsJob returns jobs; use Receive-Job -Wait -AutoRemoveJob to retrieve results/errors.
.EXAMPLE
.\Get-BrowserHistory.ps1 -ComputerName workstation01 -UserName alice -SearchTerm example.com
.NOTES
Historical regex-based source: @oregon-national-guard/cyberspace-operations,
oregon-national-guard/powershell Get-BrowserHistory.ps1. The current implementation
replaces that collection logic with SQLite snapshots. Historical source and the
complete upstream notice are preserved in THIRD_PARTY.md and
LICENSES/Oregon-National-Guard-LICENCE.txt, including its specific-script exception.
#>
[CmdletBinding()]
param(
Expand Down
5 changes: 5 additions & 0 deletions GraphAPI-GuestUserStatus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ requires appropriate licensing and roles. NoAvailableRecord does NOT mean never
signed in: data is limited by retention. API failures terminate the report.
.EXAMPLE
.\GraphAPI-GuestUserStatus.ps1 -TenantId TENANT-GUID -OutputPath .\guests.csv
.NOTES
Historical report source: Tony Redmond, Office365itpros,
ReportLastAccountSignIn-Mg.PS1. Upstream copyright (c) 2023 Tony Redmond, MIT.
This replacement changes connection handling, properties, output and error behavior.
See THIRD_PARTY.md and LICENSES/Office365itpros-MIT.txt for source and notice.
#>
[CmdletBinding()]
param([Parameter(Mandatory)][string]$TenantId, [string]$OutputPath, [switch]$Force)
Expand Down
21 changes: 21 additions & 0 deletions LICENSES/Office365itpros-MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Tony Redmond

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
50 changes: 50 additions & 0 deletions LICENSES/Oregon-National-Guard-LICENCE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
###################################################################

License
-------
This Work was prepared by a United States Government employee and,
therefore, is excluded from copyright by Section 105 of the Copyright
Act of 1976. Copyright and Related Rights in the Work worldwide are
waived through the CC0 1.0 Universal license. Portions of specific
scripts are licensed under Microsoft Limited Public License.

https://creativecommons.org/publicdomain/zero/1.0/

###################################################################

Disclaimer of Warranty
----------------------
This Work is provided "as is." Any express or implied warranties,
including but not limited to, the implied warranties of merchantability
and fitness for a particular purpose are disclaimed. In no event shall
the United States Government be liable for any direct, indirect,
incidental, special, exemplary or consequential damages (including,
but not limited to, procurement of substitute goods or services,
loss of use, data or profits, or business interruption) however caused
and on any theory of liability, whether in contract, strict liability,
or tort (including negligence or otherwise) arising in any way out of
the use of this Guidance, even if advised of the possibility of such damage.

The User of this Work agrees to hold harmless and indemnify the
United States Government, its agents and employees from every claim or
liability (whether in tort or in contract), including attorneys' fees,
court costs, and expenses, arising in direct consequence of Recipient's
use of the item, including, but not limited to, claims or liabilities
made for injury to or death of personnel of User or third parties, damage
to or destruction of property of User or third parties, and infringement or
other violations of intellectual property or technical data rights.

Nothing in this Work is intended to constitute an endorsement, explicit or implied,
by the United States Government of any particular manufacturer's product or service.

###################################################################

Disclaimer of Endorsement
-------------------------
Reference herein to any specific commercial product, process,
or service by trade name, trademark, manufacturer, or otherwise,
in this Work does not constitute an endorsement, recommendation,
or favoring by the United States Government and shall not be used
for advertising or product endorsement purposes.

###################################################################
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ reported as an error rather than silently treated as "no users" or "no activity"
- `-AsJob` returns job objects. Retrieve results and errors with
`Receive-Job -Wait -AutoRemoveJob`. Remote hosts need sqlite3 installed themselves.

## Security reporting and licensing

Report vulnerabilities through the private route described in [SECURITY.md](SECURITY.md).
Do not disclose vulnerability details or private exports in public issues. The
GitHub reporting feature must be enabled separately by the repository owner;
[maintainer setup](docs/Maintenance.md) explains how to verify it.

The root [LICENSE](LICENSE) remains the Unlicense. Consult
[third-party provenance and notices](THIRD_PARTY.md) and [preserved license texts](LICENSES/)
for identified upstream material. The historical O365Reports permission question
is still open; the review does not claim all historical code has been cleared.

## Validation and contribution

Use Pester **5.7.1**, PSScriptAnalyzer **1.24.0**, and sqlite3 **>=3.33** on Windows.
Expand Down
57 changes: 57 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Security policy

## Reporting a vulnerability

Use GitHub private vulnerability reporting for this repository. Sign in, open
[Security -> Advisories](https://github.com/SecopsEngineer/PowerShell/security/advisories)
and select **Report a vulnerability** when that button is available. The form
sends a private report to the repository maintainers; submitting this file does
not itself enable the GitHub reporting feature.

If the button is unavailable, do not put vulnerability details in an issue,
discussion, pull request, or commit. You may open a public issue titled
**Private reporting channel unavailable** containing only a request for the
maintainer to enable private reporting. Do not include affected script names,
impact, reproduction steps, exploit code, screenshots, or attachments in that
public request. Wait for a private reporting channel before sharing details.
No security email address is published by this policy.

In the private report, include:

- Affected script and commit SHA, and whether the issue reproduces on `main`.
- PowerShell, operating system and relevant module versions.
- Expected behavior, observed behavior and security impact.
- Minimal reproduction steps using synthetic accounts, tenant names and data.
- A proposed fix or workaround, if known.

Do not attach real passwords, tokens, private keys, unredacted report exports,
browser histories or personal data. Redact sensitive command-line arguments and
identifiers. Test only in environments you own or are authorized to assess.

## Maintained versions

Security fixes target the latest `main` branch. Older commits, copied scripts,
forks and any future release branches are not automatically maintained or
backported. Include the exact commit in reports so maintainers can identify the
affected code. A passing test suite is not certification of a live environment.

## Scope and handling

Report vulnerabilities in this repository's scripts or documentation, including
unintended administrative changes, credential disclosure and unsafe handling of
untrusted input. Ordinary functional bugs with no security impact can use the
public bug-report template, with synthetic and redacted examples.

Maintainers will assess reports and discuss mitigation and disclosure through
the private report. Response and remediation are best effort; this project does
not publish a service-level commitment or bug-bounty promise. Coordinate any
public disclosure with the maintainer rather than publishing a working exploit
in a public issue while a report is being assessed.

## For the repository owner

Enable **Private vulnerability reporting** under **Settings -> Advanced Security**
and confirm that **Report a vulnerability** appears on the Advisories page.
Keep security-alert notifications enabled for your account. See the
[maintenance guide](docs/Maintenance.md) for setup verification and the remaining
provenance work before a release.
Loading