Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #225

Merged
merged 212 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
f34f243
Fixed IP Geo
T0pCyber May 24, 2023
362d60d
Fixed bullets
T0pCyber May 24, 2023
a749394
Updated Hawk Global
T0pCyber Jun 22, 2023
469e09a
13 Aug Updated
T0pCyber Aug 13, 2023
d97ff36
Update functions for Tenant module
T0pCyber Aug 17, 2023
764b361
Added Get-HawkTenantAuditLog
T0pCyber Aug 17, 2023
8a5d193
Updated ReadMe
T0pCyber Sep 7, 2023
c338d3f
October2024update
T0pCyber Oct 24, 2024
7c81a4b
Merge pull request #142 from T0pCyber/master
jonnybottles Nov 3, 2024
95dbbc8
test: Add pre-commit hook test file
jonnybottles Nov 18, 2024
e8cd220
Add commented out code that would fail on PSScriptAnalyzer pre-commit…
jonnybottles Nov 18, 2024
a231fea
Add psscriptanalyzer.yml to separate pester tests (validate.yml) from…
jonnybottles Nov 19, 2024
56d8b10
Update pscriptanalyzer.yaml to use Node20 instead of deprecatated Node16
jonnybottles Nov 19, 2024
6684d61
Update pscriptanalyzer.yaml to use Node20 instead of deprecatated Node16
jonnybottles Nov 19, 2024
4859dc1
Try and address path failure in workflow.
jonnybottles Nov 19, 2024
fb74377
Try and address path failure in workflow.
jonnybottles Nov 19, 2024
ea16c4b
Change PSScriptAnalyzerSettings.psd1 path to not include GitHub works…
jonnybottles Nov 20, 2024
3180b21
Change PSScriptAnalyzerSettings.psd1 path to not include GitHub works…
jonnybottles Nov 20, 2024
d6d9588
Move psscriptanalzyer folder and associated PSSA config file, as the …
jonnybottles Nov 20, 2024
8aaa678
Move psscriptanalzyer folder and associated PSSA config file, as the …
jonnybottles Nov 20, 2024
f5cedc1
Move psscriptanalzyer folder and associated PSSA config file, as the …
jonnybottles Nov 20, 2024
ba25ed2
Move psscriptanalzyer folder and associated PSSA config file, as the …
jonnybottles Nov 20, 2024
e17f82b
Move psscriptanalzyer folder and associated PSSA config file, as the …
jonnybottles Nov 20, 2024
47ed16e
Move psscriptanalzyer folder and associated PSSA config file, as the …
jonnybottles Nov 20, 2024
2db3ebd
PSSA now works in pipeline. Howerver, there a 100+ PSSA hits on old c…
jonnybottles Nov 20, 2024
ddcd3ca
Modify psscriptanalyzer.yml to only scan changed .powershell files to…
jonnybottles Nov 20, 2024
3e02c9f
Delete .github/workflows/psscriptanalzyer.yml
jonnybottles Nov 20, 2024
c489956
Modify psscriptanalyzer.yml to only scan changed .powershell files to…
jonnybottles Nov 20, 2024
2635344
Merge branch 'feature/144-implement-dual-validation-psscriptanalyzer-…
jonnybottles Nov 20, 2024
2f29338
Test failing PSSA workflow
jonnybottles Nov 20, 2024
fa67a23
Test good workflow
jonnybottles Nov 20, 2024
2b6fd3a
Comment out PowerShell module install in vsts-prequisites.psq
jonnybottles Nov 21, 2024
05f1010
Merge branch 'feature/144-implement-dual-validation-psscriptanalyzer-…
jonnybottles Nov 21, 2024
0a38d7a
Move location of PSSA config file to Hawk/internal/configuraitons and…
jonnybottles Nov 21, 2024
83ad6c8
Move location of PSSA config file to Hawk/internal/configuraitons and…
jonnybottles Nov 21, 2024
b030636
Add vairiable in git-precommmit hook that allows you to ignore a file…
jonnybottles Nov 21, 2024
43edccf
Test pre-commit hook with good code.
jonnybottles Nov 26, 2024
18e4e88
Test pre-commit hook with pre-commit powershell code in its own file.
jonnybottles Nov 26, 2024
3933750
Test pre-commit hook with pre-commit powershell code in its own file …
jonnybottles Nov 26, 2024
a7d6aa0
Test pre-commit hook with pre-commit powershell code in its own file …
jonnybottles Nov 26, 2024
5e4ca78
Test workflow by separating PSSA workflow PowerShell code into its ow…
jonnybottles Nov 26, 2024
c73ed3e
Test workflow by separating PSSA workflow PowerShell code into its ow…
jonnybottles Nov 26, 2024
10473de
Test workflow by separating PSSA workflow PowerShell code into its ow…
jonnybottles Nov 26, 2024
8f5e792
Test workflow by separating PSSA workflow PowerShell code into its ow…
jonnybottles Nov 26, 2024
5a1cc14
Update upload results to upload file even if no bad results are found
jonnybottles Nov 26, 2024
b5e8c74
Revert to PowerShell code in yaml file.
jonnybottles Nov 26, 2024
20f21c6
Update upload results to upload file even if no bad results are found
jonnybottles Nov 26, 2024
b8a1b26
Update upload results to upload file even if no bad results are found
jonnybottles Nov 26, 2024
ec01690
Test bad results in workflow now that reverted back to yaml workflow.
jonnybottles Nov 26, 2024
d08367e
Test good workflow once more.
jonnybottles Nov 26, 2024
c818241
Test good workflow once more.
jonnybottles Nov 26, 2024
4f8e269
Test to see if failing RobustCloudCommand runs.
jonnybottles Nov 26, 2024
e5f90ee
Test to see if failing RobustCloudCommand runs.
jonnybottles Nov 26, 2024
992de67
Update build.yml
jonnybottles Nov 26, 2024
d63167c
Test to see if failing RobustCloudCommand runs.
jonnybottles Nov 26, 2024
003662e
Merge branch 'feature/144-implement-dual-validation-psscriptanalyzer-…
jonnybottles Nov 26, 2024
fc4dff4
Test good PSSA commit.
jonnybottles Nov 26, 2024
593151e
Test good PSSA commit.
jonnybottles Nov 26, 2024
bdcef6b
comment out flow to merge PSSA changes into Development Branch
jonnybottles Nov 27, 2024
a83ff6b
Comment out validate.yml to allow to push * feature/144-implement-dua…
jonnybottles Nov 27, 2024
5804eba
Merge pull request #145 from T0pCyber/feature/144-implement-dual-vali…
jonnybottles Nov 27, 2024
cd19374
Uncomment out validate.yml
jonnybottles Nov 27, 2024
3f4815e
Update validate.yml
T0pCyber Nov 27, 2024
dd9a9c3
Update psscriptanalyzer.yml
T0pCyber Nov 27, 2024
eabdd65
Merge pull request #155 from T0pCyber/navarrodev
T0pCyber Nov 27, 2024
9e3ccd9
Update psscriptanalyzer.yml
T0pCyber Nov 27, 2024
a6e9f9d
Update validate.yml
T0pCyber Nov 27, 2024
e21587b
Update validate.yml
jonnybottles Nov 29, 2024
3012e40
Update build.yml
jonnybottles Nov 29, 2024
6b98090
Update Hawk.psd1
jonnybottles Nov 29, 2024
8e37536
Remove uncecessary Robust Cloud Command Module.
jonnybottles Nov 29, 2024
97c798d
Modify action files to run in bugfix/117 branch to see if the build p…
jonnybottles Nov 29, 2024
93d9804
Comment out validate workflow as 11 tests are failing. Will open new …
jonnybottles Nov 29, 2024
ae4e431
Comment out validate workflow as 11 tests are failing. Will open new …
jonnybottles Nov 29, 2024
d7e63ec
Modify build to only run on master as this publishes to the PS Gallery
jonnybottles Nov 29, 2024
d585cc8
Modify build to only run on master as this publishes to the PS Gallery
jonnybottles Nov 29, 2024
1a7ef51
Comment out running tests as 11 fail, will open new ticket for this.
jonnybottles Nov 29, 2024
f97dea8
Remove bug fix branch from validate.yml now that ticket is closed
jonnybottles Nov 29, 2024
1fec7b1
Uncomment validate.yml to run tests to see what tests are failing.
jonnybottles Nov 29, 2024
648aaff
Uncomment validate.yml to run tests to see what tests are failing.
jonnybottles Nov 29, 2024
e12627c
fix: Add ShouldProcess support to Start-HawkTenantInvestigation
jonnybottles Nov 29, 2024
c1ad4b6
Change plural noun of function name to sinular noun Get-HawkTenantEDi…
jonnybottles Nov 29, 2024
0461e30
Add exclude trailing whitespace back to PSSA config file.
jonnybottles Nov 29, 2024
98b7fd1
Add comment to run workflow to see failing tests.
jonnybottles Nov 30, 2024
3ffe946
fix: Update module function exports and help documentation
jonnybottles Dec 1, 2024
51cc62a
Merge pull request #158 from T0pCyber/bugfix/157-bug-multiple-failed-…
T0pCyber Dec 1, 2024
85fea93
- Removed redundant popup notification about MGGraph support from Ini…
jonnybottles Dec 3, 2024
94caacd
ensure validate.yml is workflow is wran on this bugfix/162 branch to …
jonnybottles Dec 3, 2024
62893fc
Add Run-PesterTests.ps1 to allow for running all pester tests locally…
jonnybottles Dec 3, 2024
f16ef42
Fix vsts-prequisties build bug.
jonnybottles Dec 3, 2024
791b1da
Rever vsts-prequisites to not call a specific version of pester.
jonnybottles Dec 3, 2024
13feedd
Modify Run-PesterTests.ps1 to run all tests regardless of the test su…
jonnybottles Dec 4, 2024
e3f0a6b
Modify pester.ps1 to recurse through all test dirs.
jonnybottles Dec 4, 2024
cec3205
Test reverting pester to original state.
jonnybottles Dec 4, 2024
c9c2795
Fix PSSA Analyzer script issues with plural noun in Get-HawkTenantAZA…
jonnybottles Dec 4, 2024
e168e63
Fix pester.ps1
jonnybottles Dec 4, 2024
a89076c
Replace AzureAD with Microsoft Graph in consent grant functions
jonnybottles Dec 4, 2024
cbb4611
Fix pester test issues and add runnign pester tests to local commits.
jonnybottles Dec 4, 2024
d4c658a
Fix pester test results.
jonnybottles Dec 4, 2024
8ed6df1
fix(Get-HawkTenantAzureADUsers): Update Graph API property selection
jonnybottles Dec 5, 2024
d9cccb7
Test local PSSA run
jonnybottles Dec 6, 2024
f6e5c09
Migrate Get-HawkTentantAppAndSPNCredentialDetail from AzureAD command…
jonnybottles Dec 8, 2024
d7a046c
Fix pester test results.
jonnybottles Dec 8, 2024
22cf358
Update ExchangeOnlineManagement to newest version.
jonnybottles Dec 8, 2024
842dd4e
Remove AzureAD from Hawk.psd1 and delecte Test-AzureADConnection.ps1 …
jonnybottles Dec 8, 2024
3eb3bf6
Add initial ability to pull down data using Get-HawkUserAdminAudit an…
jonnybottles Dec 8, 2024
51546a6
Modify Get-SimpleUnifiedAuditLog to handle null object error.
jonnybottles Dec 8, 2024
e96ee88
Adds abilityt to parse and write simple_user_changes and user_changes…
jonnybottles Dec 8, 2024
7a5dd2f
Remove raw text file output.
jonnybottles Dec 8, 2024
3ec4712
Add initial parsing with Get-HawkUserMailBoxAuditing
jonnybottles Dec 8, 2024
d263b55
Merge pull request #171 from T0pCyber/bugfix/162-modernize-authentica…
T0pCyber Dec 8, 2024
cd279c1
feat: Update Entra ID terminology and object identifiers
jonnybottles Dec 9, 2024
1ab17dd
Modify Get-SimpleUnifiedAuditLog.ps1 to parse every single field and …
jonnybottles Dec 9, 2024
be14d0f
Add comment based help to get-simpleunifiedauditlog.ps1
jonnybottles Dec 9, 2024
201025e
Change name of Get-HawkTenantRbacChanges to Get-HawkTenantRbacChange,…
jonnybottles Dec 10, 2024
e63d277
Change name of Get-HawkTenantRbacChanges to Get-HawkTenantRbacChange,…
jonnybottles Dec 10, 2024
9eac914
Change name of Get-HawkTenantRbacChanges to Get-HawkTenantRbacChange,…
jonnybottles Dec 10, 2024
959ce41
Revert Get-HawkUserMailBoxAuditing to old / original code.
jonnybottles Dec 10, 2024
afb940a
Change coment code from base schema to common schema to reflect MS docs.
jonnybottles Dec 10, 2024
87c2d62
Update Get-SimpleUnifiedAuditLog to flatten any UAL record type.
jonnybottles Dec 10, 2024
f3c9ae1
Modify Get-HawkUserAdminAudit to call Get-AllUnifiedAuditLogEntry to …
jonnybottles Dec 10, 2024
0fe454e
Modify Get-HawkTenantRbacChange to call Get-AllUnifiedAuditLogEntry t…
jonnybottles Dec 10, 2024
44b9aeb
Update Get-HawkUserMailBoxAuditing to migrate from deprecated Search-…
jonnybottles Dec 10, 2024
19a1aa1
Modify UAL common schema parameters to be in order within CSV as per …
jonnybottles Dec 11, 2024
ffff632
Merge branch 'bugfix/152-bug-update-get-simpleadminauditlogps1-to-par…
jonnybottles Dec 11, 2024
e0a32e5
Refactor Search-HawkTenantEXOAuditLog to break it into smaller more m…
jonnybottles Dec 13, 2024
2f260a8
Modify .gitignore to not allow .csv, .xlsx, .json, .docs files in the…
jonnybottles Dec 14, 2024
ab183f8
Merge pull request #173 from T0pCyber/bugfix/162-modernize-authentica…
T0pCyber Dec 15, 2024
a0bdb65
Merge branch 'Development' into bugfix/152-bug-update-get-simpleadmin…
T0pCyber Dec 15, 2024
a4d9f7f
Address import issue in manifest file with singluar / plural naming o…
jonnybottles Dec 15, 2024
080277b
Merge pull request #205 from T0pCyber/bugfix/152-bug-update-get-simpl…
T0pCyber Dec 15, 2024
437b481
Merge development branch into current branch
jonnybottles Dec 15, 2024
bf0544e
Merge development branch into current branch
jonnybottles Dec 15, 2024
855dc30
Merge branch 'bugfix/147-bug-update-search-hawktenantexoauditlogps1-t…
jonnybottles Dec 18, 2024
9096357
Add Entra ID function calls to Start-HawkTenantInvestigation that sho…
jonnybottles Dec 18, 2024
34e5cbc
Update comment based help of Get-HawkTenantInboxRuleHistory and GetHa…
jonnybottles Dec 19, 2024
06b4bdb
Update comment based help and file names to be more self explanitory.
jonnybottles Dec 19, 2024
2136e13
Update comment based help to mention that this searches for rules cre…
jonnybottles Dec 19, 2024
5a622bf
Change function and filenames to indicate that the inbox rules pulled…
jonnybottles Dec 19, 2024
b64c57a
Add comment to see if git commit prehook is working.
jonnybottles Dec 19, 2024
e827a23
Modify Out-LogFile to use the same formatted log tags as other logs, …
jonnybottles Dec 19, 2024
c3eb794
Modify Out-LogFile to use the same formatted log tags as other logs, …
jonnybottles Dec 19, 2024
35a767c
Modify Out-LogFile to use the same formatted log tags as other logs, …
jonnybottles Dec 19, 2024
e603dbb
Modify Out-Logfile to implment a -Information switch, which is used t…
jonnybottles Dec 19, 2024
63e051f
Get-HawkTenantAdminInboxRuleHistory updated to use -Information taggi…
jonnybottles Dec 19, 2024
4b04292
Re-name Get-HawkAdminInboxRuleHistory to Get-HawkAdminInboxRuleCreati…
jonnybottles Dec 19, 2024
40e1070
Re-name Get-HawkAdminInboxRuleHistory to Get-HawkAdminInboxRuleCreati…
jonnybottles Dec 19, 2024
787295f
Make appropraite call to Get-HawkTenantAdminInbixRuleCreation
jonnybottles Dec 19, 2024
f009d4b
Add Get-HawkTenantAdminMailBoxPermissionChange function.
jonnybottles Dec 19, 2024
e2cd6e6
Add Get-HawkTenantAdminMailBoxPermissionChange function to include ru…
jonnybottles Dec 19, 2024
a7884b9
Add initial code for Get-HawkTenantImpersonationAccess.
jonnybottles Dec 20, 2024
691afff
Remove Get-HawkTenantImpersonationAccess as RBAC application imperson…
jonnybottles Dec 20, 2024
ac9814c
Removing function run time as this was for debugging purposes.
jonnybottles Dec 20, 2024
8e51608
Remove Search-HawkTenantEXOAuditLog as this has been separated into s…
jonnybottles Dec 20, 2024
39bc020
Remove Search-HawkTenantEXOAuditLog from Hawk.psd1 as it is no longer…
jonnybottles Dec 20, 2024
e414fa3
Updated changelog.md
jonnybottles Dec 20, 2024
55fc27c
Removed resolving IP binary.
jonnybottles Dec 20, 2024
2baabd3
Updated change log.
jonnybottles Dec 20, 2024
32daa23
Merge pull request #209 from T0pCyber/bugfix/147-bug-update-search-ha…
T0pCyber Dec 22, 2024
68e55ea
Chagne Out-Logfile to use -isError instead of Error dude to PSSM scan…
jonnybottles Dec 22, 2024
2e817dd
Added Microsoft.Graph.Users and Microsoft.Graph.Applications as depde…
jonnybottles Dec 22, 2024
c6c6ad5
Merge branch 'Development' into bugfix/dec-22-meet-up
T0pCyber Dec 22, 2024
f90c177
Merge pull request #212 from T0pCyber/bugfix/dec-22-meet-up
T0pCyber Dec 22, 2024
0b64ff1
Add Microsoft.Graph.Reports to list of required modules.
jonnybottles Dec 22, 2024
8b6c1f7
Merge branch 'bugfix/dec-22-meet-up' of github.com:T0pCyber/hawk into…
jonnybottles Dec 22, 2024
5b679e3
Merge branch 'Development' into bugfix/dec-22-meet-up
T0pCyber Dec 22, 2024
fa8e24c
Merge pull request #213 from T0pCyber/bugfix/dec-22-meet-up
T0pCyber Dec 22, 2024
f089532
Change Get-HawkTenantInboxRule to singular noun.
jonnybottles Dec 22, 2024
d661383
Merge branch 'bugfix/dec-22-meet-up' of github.com:T0pCyber/hawk into…
jonnybottles Dec 22, 2024
390898b
Merge branch 'Development' into bugfix/dec-22-meet-up
T0pCyber Dec 22, 2024
b9d7a16
Change Get-HawkTenantInboxRule to singular noun.
jonnybottles Dec 22, 2024
fca109f
Merge branch 'bugfix/dec-22-meet-up' of github.com:T0pCyber/hawk into…
jonnybottles Dec 22, 2024
c0021e5
Merge pull request #215 from T0pCyber/bugfix/dec-22-meet-up
T0pCyber Dec 22, 2024
e3a3f07
Merge branch 'Development' into bugfix/150-bug-update-get-hawktenante…
jonnybottles Dec 22, 2024
e4bd8c4
Merge branch 'Development' into bugfix/150-bug-update-get-hawktenante…
jonnybottles Jan 4, 2025
bd3210c
Add ability to combine all eDiscovery roles into one csv file.
jonnybottles Jan 6, 2025
0fbd61f
Fix issues in Get-HawkTenantInboxRule as identified by PSSA scan, lef…
jonnybottles Jan 6, 2025
0d973c4
Fix PSSA warnings in Get-HawkUserHiddenRule:
jonnybottles Jan 6, 2025
4ca517b
Add comment based help
jonnybottles Jan 6, 2025
094ff8e
Modify Read-HawkAppData to satsify PSSA requirement
jonnybottles Jan 6, 2025
1ab66fc
Modify Start-HawkUserInvestigation to use should process to abide by …
jonnybottles Jan 6, 2025
3529cbc
Modify Start-HawkUserInvestigation to use should process to abide by …
jonnybottles Jan 6, 2025
c24261a
Modify Start-HawkUserInvestigation to use should process to abide by …
jonnybottles Jan 6, 2025
97d118f
Modify Start-HawkUserInvestigation to use should process to abide by …
jonnybottles Jan 6, 2025
7311092
Modify Start-HawkUserInvestigation to use should process to abide by …
jonnybottles Jan 6, 2025
3833acb
Modify Start-HawkUserInvestigation to use should process to abide by …
jonnybottles Jan 6, 2025
d546994
Modify Start-HawkUserInvestigation to use should process to abide by …
jonnybottles Jan 6, 2025
360eeba
Add correct license URI to hawk.psd1. Revert all internal functions b…
jonnybottles Jan 7, 2025
8d4bb20
Update Add-HawkAppDAta to use Out-LogFile prompt tags
jonnybottles Jan 7, 2025
9930bd3
Update Get-AllUnifiedAuditLogEntry to use Out-LogFile prompt tags
jonnybottles Jan 7, 2025
d2c0985
Update Get-IPGeoLocation to use Out-LogFile prompt tags
jonnybottles Jan 7, 2025
95c8cc2
Update Out-HawkAppDAta to use Out-LogFile prompt tags
jonnybottles Jan 7, 2025
c7cf958
Update Out-MultipleFileType to use Out-LogFile prompt tags
jonnybottles Jan 7, 2025
772ab32
Update Read-HawkAppDAta to use Out-LogFile prompt tags
jonnybottles Jan 7, 2025
3a7abf1
Update Test-UserObject to use Out-LogFile prompt tags
jonnybottles Jan 7, 2025
cf1393a
Update Test-GraphConnection to use static tag prompting to avoid circ…
jonnybottles Jan 7, 2025
2dbdc5a
Update Initializing Application Insights to use static date/time form…
jonnybottles Jan 7, 2025
fc0af34
Create hawk banner writing function
jonnybottles Jan 7, 2025
e08c075
Output to screen cleaned up substantially.
jonnybottles Jan 7, 2025
f3c82a6
Complete Get-HawkTenantEDisocoveryConfiguration.
jonnybottles Jan 7, 2025
83c1d8b
HawkPWNCheck
T0pCyber Jan 7, 2025
6029f23
PWNCheck Custom Object
T0pCyber Jan 7, 2025
ec30b1d
Update comment based help
T0pCyber Jan 7, 2025
192e050
Uncomment Start-HawkInvestigation function calls. Update change log.
jonnybottles Jan 7, 2025
316f145
Uncomment Start-HawkInvestigation function calls. Update change log.
jonnybottles Jan 7, 2025
2208dfe
Merge pull request #221 from T0pCyber/bugfix/150-bug-update-get-hawkt…
T0pCyber Jan 7, 2025
8717c1f
ChangeLog Update
T0pCyber Jan 7, 2025
b7643ba
Merge branch 'Development' into bugfix/216-bug-pwncheckfunction-not-w…
jonnybottles Jan 8, 2025
a6721d8
Merge pull request #223 from T0pCyber/bugfix/216-bug-pwncheckfunction…
T0pCyber Jan 8, 2025
61d6906
Update ChangeLog and version
T0pCyber Jan 8, 2025
4d8e5e7
Remove improperly formatted JSON from Get-HawkTenantAdminInboxRuleHis…
jonnybottles Jan 8, 2025
f56dd1a
Merge pull request #224 from T0pCyber/bugfix/raw-json-removal
T0pCyber Jan 8, 2025
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
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
on:
push:
pull_request:
branches:
- master

jobs:
build:
runs-on: windows-2019
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/psscriptanalyzer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: PSScriptAnalyzer
on:
pull_request:
paths:
- "**.ps1"
- "**.psm1"
- "**.psd1"
push:
paths:
- "**.ps1"
- "**.psm1"
- "**.psd1"

jobs:
analyze:
name: PSScriptAnalyzer
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for getting changed files

- name: Get changed files
shell: pwsh
run: |
if ($env:GITHUB_EVENT_NAME -eq 'pull_request') {
$baseCommit = git rev-parse $env:GITHUB_EVENT.pull_request.base.sha
$headCommit = git rev-parse HEAD
$changedFiles = git diff --name-only $baseCommit..$headCommit
} else {
$changedFiles = git diff --name-only HEAD^1 HEAD
}

$powershellFiles = $changedFiles | Where-Object {
$_ -match '\.(ps1|psm1|psd1)$'
}

$powershellFiles | Out-File -FilePath $env:GITHUB_WORKSPACE/changed_files.txt
Write-Host "Changed PowerShell files:"
$powershellFiles | ForEach-Object { Write-Host " $_" }

- name: Install PSScriptAnalyzer
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module PSScriptAnalyzer -Force

- name: Run PSScriptAnalyzer
shell: pwsh
run: |
$settingsPath = Join-Path $env:GITHUB_WORKSPACE 'Hawk' 'internal' 'configurations' 'PSScriptAnalyzerSettings.psd1'

Write-Output "Using settings file: $settingsPath"
if (-not (Test-Path $settingsPath)) {
Write-Error "PSScriptAnalyzer settings file not found at: $settingsPath"
exit 1
}

$changedFiles = Get-Content -Path "$env:GITHUB_WORKSPACE/changed_files.txt"
if (-not $changedFiles) {
Write-Output "No PowerShell files were changed"
$null > (Join-Path $env:GITHUB_WORKSPACE 'psscriptanalyzer-results.txt')
exit 0
}

$results = @()
foreach ($file in $changedFiles) {
$fullPath = Join-Path $env:GITHUB_WORKSPACE $file
if (Test-Path $fullPath) {
Write-Output "Analyzing $fullPath"
$fileResults = Invoke-ScriptAnalyzer -Path $fullPath -Settings $settingsPath
if ($fileResults) {
$results += $fileResults
}
}
}

if ($results) {
Write-Output "Found $($results.Count) issues in changed files:"
$results | Format-Table -AutoSize | Out-String | Write-Output
$results | Format-Table -AutoSize | Out-File (Join-Path $env:GITHUB_WORKSPACE 'psscriptanalyzer-results.txt')
exit 1
} else {
Write-Output "No PSScriptAnalyzer issues found in changed files"
$null > (Join-Path $env:GITHUB_WORKSPACE 'psscriptanalyzer-results.txt')
exit 0
}

- name: Upload Results
if: always()
uses: actions/upload-artifact@v4
with:
name: psscriptanalyzer-results
path: psscriptanalyzer-results.txt
if-no-files-found: warn
11 changes: 10 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
on: [pull_request]
on:
pull_request:
branches:
- master
- Development
push:
branches:
- master
- Development
- bugfix/162-modernize-authentication-to-replace-azuread-with-microsoft-graph

jobs:
validate:
Expand Down
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# ignore the settings folder and files for VSCode and PSS
# ignore the settings folder and files for VSCode and PSS
.vscode/*
*.psproj
*TempPoint*
Expand All @@ -19,4 +18,11 @@ Hawk/Hawk.psproj
TestResults/*

# ignore the publishing Directory
publish/*
publish/*

# Ignore all .csv, .json, .docx, and .xlsx files
*.csv
*.json
*.docx
*.doc
*.xlsx
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: local
hooks:
- id: powershell-script-analyzer
name: PowerShell Script Analyzer
entry: pwsh
args:
- -NoProfile
- -ExecutionPolicy
- Bypass
- -File
- Hawk/internal/scripts/pre_commit_hook_scripts/Invoke-PowerShellScriptAnalyzer.ps1
language: system
types: [powershell]
122 changes: 64 additions & 58 deletions Hawk/Hawk.psd1
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
@{
# Script module or binary module file associated with this manifest
RootModule = 'Hawk.psm1'
RootModule = 'Hawk.psm1'

# Version number of this module.
ModuleVersion = '3.1.0'
ModuleVersion = '3.2.4'

# ID used to uniquely identify this module
GUID = '1f6b6b91-79c4-4edf-83a1-66d2dc8c3d85'
GUID = '1f6b6b91-79c4-4edf-83a1-66d2dc8c3d85'

# Author of this module
Author = 'Paul Navarro'
Author = 'Paul Navarro, Jonathan Butler'

# Company or vendor of this module
CompanyName = 'Cloud Forensicator'
CompanyName = 'Cloud Forensicator'

# Copyright statement for this module
Copyright = 'Copyright (c) 2023 Paul Navarro'
Copyright = 'Copyright (c) 2025 Paul Navarro'

# Description of the functionality provided by this module
Description = 'Microsoft 365 Incident Response and Threat Hunting PowerShell tool.
Description = 'Microsoft 365 Incident Response and Threat Hunting PowerShell tool.
The Hawk is designed to ease the burden on M365 administrators who are performing Cloud forensic tasks for their organization.
It accelerates the gathering of data from multiple sources in the service that be used to quickly identify malicious presence and activity.'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.0'
PowerShellVersion = '5.0'

# Modules that must be imported into the global environment prior to importing
# this module
RequiredModules = @(
@{ModuleName = 'PSFramework'; ModuleVersion = '1.4.150'},
@{ModuleName = 'PSAppInsights'; ModuleVersion = '0.9.6'},
@{ModuleName = 'ExchangeOnlineManagement'; ModuleVersion = '3.0.0'},
@{ModuleName = 'RobustCloudCommand'; ModuleVersion = '2.0.1'},
@{ModuleName = 'AzureAD'; ModuleVersion = '2.0.2.140'},
@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '1.23.0'},
@{ModuleName = 'Microsoft.Graph.Identity.DirectoryManagement'; ModuleVersion = '1.23.0'}
RequiredModules = @(
@{ModuleName = 'PSFramework'; ModuleVersion = '1.12.346' },
@{ModuleName = 'PSAppInsights'; ModuleVersion = '0.9.6' },
@{ModuleName = 'ExchangeOnlineManagement'; ModuleVersion = '3.0.0' },
@{ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '2.25.0' },
@{ModuleName = 'Microsoft.Graph.Identity.DirectoryManagement'; ModuleVersion = '2.25.0' },
@{ModuleName = 'Microsoft.Graph.Users'; ModuleVersion = '2.25.0' },
@{ModuleName = 'Microsoft.Graph.Applications'; ModuleVersion = '2.25.0' },
@{ModuleName = 'Microsoft.Graph.Identity.Signins'; ModuleVersion = '2.25.0' },
@{ModuleName = 'Microsoft.Graph.Reports'; ModuleVersion = '2.25.0' }
)

# Assemblies that must be loaded prior to importing this module
Expand All @@ -47,40 +49,44 @@
# FormatsToProcess = @('xml\Hawk.Format.ps1xml')

# Functions to export from this module
FunctionsToExport =
'Get-HawkTenantConfiguration',
'Get-HawkTenantEDiscoveryConfiguration',
'Get-HawkTenantInboxRules',
'Get-HawkTenantConsentGrants',
'Get-HawkTenantRBACChanges',
'Get-HawkTenantAzureAuditLog',
'Get-HawkUserAuthHistory',
'Get-HawkUserConfiguration',
'Get-HawkUserEmailForwarding',
'Get-HawkUserInboxRule',
'Get-HawkUserMailboxAuditing',
'Initialize-HawkGlobalObject',
'Search-HawkTenantActivityByIP',
'Search-HawkTenantEXOAuditLog',
'Show-HawkHelp',
'Start-HawkTenantInvestigation',
'Start-HawkUserInvestigation',
'Update-HawkModule',
'Get-HawkUserAdminAudit',
'Get-HawkTenantAuthHistory',
'Get-HawkUserHiddenRule',
'Get-HawkMessageHeader',
'Get-HawkUserPWNCheck',
'Get-HawkUserAutoReply',
'Get-HawkUserMessageTrace',
'Get-HawkUserMobileDevice',
'Get-HawkTenantAZAdmins',
'Get-HawkTenantEXOAdmins',
'Get-HawkTenantMailItemsAccessed',
'Get-HawkTenantAppAndSPNCredentialDetails',
'Get-HawkTenantAzureADUsers',
'Get-HawkTenantDomainActivity',
'Get-HawkTenantEDiscoveryLogs'
FunctionsToExport =
'Get-HawkTenantConfiguration',
'Get-HawkTenantEDiscoveryConfiguration',
'Get-HawkTenantInboxRule',
'Get-HawkTenantConsentGrant',
'Get-HawkTenantRBACChange',
'Get-HawkTenantAzureAppAuditLog',
'Get-HawkUserAuthHistory',
'Get-HawkUserConfiguration',
'Get-HawkUserEmailForwarding',
'Get-HawkUserInboxRule',
'Get-HawkUserMailboxAuditing',
'Search-HawkTenantActivityByIP',
'Get-HawkTenantAdminInboxRuleCreation',
'Get-HawkTenantAdminInboxRuleModification',
'Get-HawkTenantAdminInboxRuleRemoval',
'Get-HawkTenantAdminMailboxPermissionChange',
'Get-HawkTenantAdminEmailForwardingChange',
'Show-HawkHelp',
'Start-HawkTenantInvestigation',
'Start-HawkUserInvestigation',
'Update-HawkModule',
'Get-HawkUserAdminAudit',
'Get-HawkTenantAuditLog',
'Get-HawkTenantAuthHistory',
'Get-HawkUserHiddenRule',
'Get-HawkMessageHeader',
'Get-HawkUserPWNCheck',
'Get-HawkUserAutoReply',
'Get-HawkUserMessageTrace',
'Get-HawkUserMobileDevice',
'Get-HawkTenantEntraIDAdmin',
'Get-HawkTenantEXOAdmin',
'Get-HawkTenantMailItemsAccessed',
'Get-HawkTenantAppAndSPNCredentialDetail',
'Get-HawkTenantEntraIDUser',
'Get-HawkTenantDomainActivity',
'Get-HawkTenantEDiscoveryLog'

# Cmdlets to export from this module
# CmdletsToExport = ''
Expand All @@ -92,31 +98,31 @@
# AliasesToExport = ''

# List of all modules packaged with this module
ModuleList = @()
ModuleList = @()

# List of all files packaged with this module
FileList = @()
FileList = @()

# Private data to pass to the module specified in ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
PrivateData = @{

#Support for PowerShellGet galleries.
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = @("O365","Security","Audit","Breach","Investigation","Exchange","EXO","Compliance","Logon","M365","Incident-Response","Solarigate")
Tags = @("O365", "Security", "Audit", "Breach", "Investigation", "Exchange", "EXO", "Compliance", "Logon", "M365", "Incident-Response", "Solarigate")

# A URL to the license for this module.
LicenseUri = 'https://github.com/T0pCyber/Hawk/LICENSE'
LicenseUri = 'https://github.com/T0pCyber/hawk/blob/master/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/T0pCyber/Hawk'
ProjectUri = 'https://github.com/T0pCyber/Hawk'

# A URL to an icon representing this module.
IconUri = 'https://i.ibb.co/XXH4500/Hawk.png'
IconUri = 'https://i.ibb.co/XXH4500/Hawk.png'

# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/T0pCyber/Hawk/Hawk/changelog.md'
ReleaseNotes = 'https://github.com/T0pCyber/hawk/blob/master/Hawk/changelog.md'

} # End of PSData hashtable

Expand Down
Loading
Loading