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
20 changes: 20 additions & 0 deletions .github/workflows/pester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Pester Tests

on: [pull_request]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]

steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: Install-Module -Name 'Pester' -Force -SkipPublisherCheck
shell: pwsh
- name: Run tests
run: Invoke-Pester -Path './test/' -CI
shell: pwsh
21 changes: 21 additions & 0 deletions .github/workflows/scriptanalyzer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ScriptAnalyzer

on: [pull_request]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]

steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: Install-Module -Name 'PSScriptAnalyzer' -Force -SkipPublisherCheck
shell: pwsh
- name: ScriptAnalyzer
run: Invoke-ScriptAnalyzer -Path '.\src\' -Recurse -EnableExit
shell: pwsh

8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Unreleased

### Added

### Changed

### Removed

## [0.0.1] - 2026-03-17

### Added

- Initial Push, first batch of functions added to the module.
50 changes: 22 additions & 28 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
University of Illinois/NCSA Open Source License
Copyright (c) 2026 University of Illinois. All rights reserved.

Copyright (c) 2023 by the Board of Trustees of the University of
Illinois. All rights reserved.

Developed by Cybersecurity and Technology Services
University of Illinois
https://techservices.illinois.edu
Developed by: Cybersecurity Engineering
University of Illinois
https://github.com/techservicesillinois/Secops-Powershell-Box

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal with 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:

- Redistributions of source code must retain the above copyright notice,
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
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:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the documentation
and/or other materials provided with the distribution.
* Neither the names of Cybersecurity Engineering, University of Illinois,
nor the names of its contributors may be used to endorse or promote products
derived from this Software without specific prior written permission.

- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.

- Neither the names of University of Illinois nor the names of its
contributors may be used to endorse or promote products derived from
this Software without specific prior written permission.

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
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
CONTRIBUTORS 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 WITH
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
123 changes: 96 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,112 @@
## About
![Pester Tests](https://github.com/techservicesillinois/Secops-Powershell-Box/workflows/Pester%20Tests/badge.svg)
![ScriptAnalyzer](https://github.com/techservicesillinois/Secops-Powershell-Box/workflows/ScriptAnalyzer/badge.svg)

This repository is used by Cybersecurity operations teams at the
University of Illinois as a GitHub template.
# What is This?

This resource helps comply with University of Illinois
Cybersecurity standards - including [IT-07][it07], [IT08][it08],
and [IT13][it13].
This is a PowerShell module for automating interactions with the Box API. It provides a clean, reusable set of functions for managing folders, files, and user access within Box.

[it07]: https://go.illinois.edu/secstd-IT07
[it08]: https://go.illinois.edu/secstd-IT08
[it13]: https://go.illinois.edu/secstd-IT13
The module is designed for automation scenarios such as:

See [Cybersecurity Development on the Illinois Knowledge Base][kbsearch]
for information about our development standards.
Ticket-driven provisioning

[kbsearch]: https://answers.uillinois.edu/illinois/search.php?q=cybersecurity+developer&cat=0
Scheduled jobs

The remainder of this `README.md` contains example text.
Azure Automation runbooks

## Data Sources
Security and compliance workflows

|Data Store|Data Type|Sensitivity|Notes|
|----------|---------|-----------|-----|
It simplifies Box API usage by handling authentication, REST calls, and common operations behind easy-to-use PowerShell functions.

## Endpoint Connections
# How do I install it?

|Endpoint|Purpose|Stage|Access|
|--------|-------|-----|------|
The latest stable release is always available via the PSGallery.

## Product Support
This will install on the local machine:

This product is supported by Cybersecurity teams at the
University of Illinois Urbana-Champaign on a best-effort basis.
Install-Module -Name 'UofIBox'

As of the last update to this README, the expected End-of-Life and
End-of-Support dates of this product are <YEAR MONTH>.
### Prerequisites

End-of-Life was decided upon based on these dependencies:
PowerShell 7+

- <dependency (YEAR MONTH) >
- <dependency (YEAR MONTH) >
A Box application configured for Client Credentials Grant

Box Client ID, Client Secret, and Enterprise ID

# How does it work?

The module is built around two core components:

Authentication

New-BoxSession authenticates to Box using OAuth Client Credentials and stores the access token for reuse.

$Credential = Get-Credential
New-BoxSession -Credential $Credential
REST Wrapper

Invoke-BoxRestCall is a centralized wrapper for all API calls. It handles:

Authentication headers

Base URI construction

JSON conversion

Error handling

File downloads

Key Functions
Folder Management

New-BoxFolderWithCollaboration – Create folders and assign users/roles

Get-BoxFolder – Retrieve folder metadata

Remove-BoxFolder – Delete folders

File Management

Upload-BoxFile – Upload files

Get-BoxFile – Retrieve file metadata

Remove-BoxFile – Delete files

Receive-BoxFile – Download files

Folder Download

Receive-BoxFolder – Recursively downloads a folder and recreates the structure locally

Example Workflow
$Credential = Get-Credential
New-BoxSession -Credential $Credential

New-BoxFolderWithCollaboration `
-FolderName "SecurityProject" `
-Login user@company.com `
-Role editor

# How do I help?

Contributions are welcome. You can help by:

Reporting bugs or issues

Suggesting new features

Improving documentation

Refactoring functions for performance or readability

If contributing:

Follow existing function structure and naming conventions

Ensure all functions use Invoke-BoxRestCall

Include comment-based help for all functions

# To Do
Loading