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

Create README.md #102

Merged
merged 3 commits into from
Oct 2, 2024
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 cybersecurity-scripts/TSS/WHOHVOL/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Broadcom TSS WHOHVOL REXX Script
WHOHVOL REXX can interactively identify, using a single command, who has access to all owned VOLUME resources within TSS. This REXX is an example of the “art of the possible” in using REXX with TSS.

The challenge: Provide a simpler method for reviewing who has VOLUME resource access based on all volume resources owned.

Background: Previously, to review all Volume access, the mainframe cybersecurity professional needed to manually perform the following steps: (1) List all volume ownership - TSS WHOOWNS VOL(*), (2) Manually build all of the TSS WHOHAS VOLUME(xxxxxx) commands, and (3) Submit as a batch job and review the output. TSO WHOHVOL performs those steps interactively and provides the resulting report into a temporary dataset, placing the professional into edit mode and allowing for them to copy/paste/create or process as desired.

# Using
Sample scripts for each product are located in the directory that shares its name. If you cannot find a particular use case, [please open an issue](https://github.com/BroadcomMFD/broadcom-product-scripts/issues/new).

What to do:
1. Upload the WHOHVOL.rexx.txt as WHOHVOL into your CLIST/REXX library.
2. Execute: TSO WHOHVOL
3. WHOHVOL only takes a few seconds to complete and produce the report for your review.


# Contributing
**We are not accepting third-party contributions at this time. If you are interested in contributing, please contact [email protected] & [email protected] & [email protected] or [email protected] to discuss.**

It is the responsibility of the original contributor to resolve vulnerabilities identified by Dependabot within their contributions.
72 changes: 72 additions & 0 deletions cybersecurity-scripts/TSS/WHOHVOL/WHOHVOL.rexx.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*REXX ***************************************************************/
/* */
/* Purpose: TSS provdies commands to list ownership of VOLUME */
/* resources (TSS WHOOWNS VOLUME(*)) and also provides commands to */
/* view who has access to specific owned volumes. */
/* */
/* Challenge: Provide single report showing all of who has access */
/* to volume level resources without having to edit the output of */
/* TSS WHOOWNS VOLUME(*) and manually building TSS WHOHAS VOLUME */
/* for each volume owned/defined within TSS. */
/* */
/* syntax: TSO WHOHVOL */
/* */
/* */
/* */
/* Version 1.0 October 2024 */
/* */
STATUS = MSG('ON')
STATUS = MSG('OFF')
current_seconds = TIME(S)
last_qual = "D"current_seconds
user = userid()
udsn = user'.TSS.TEMP.'last_qual'.'p1
udsn = strip(udsn)
ddname = "A"current_seconds
DSN = USERID() || ".TSS." || cmd || "." || last_qual
UNIT = "UNIT(SYSDA)"
SPC = "TRACKS SPACE(50,50)"
"FREE F("ddname")"
"DELETE" DSN

if sysdsn("'"DSN"'") = OK then
"alloc f("ddname") da('"DSN"') shr reu"
else
"alloc f("ddname") da('"DSN"') NEW SP(50 50)
TR DSORG(PS) RECFM(F B) LRECL(133)"


"ISPEXEC VGET (DATA) PROFILE"
X=OUTTRAP('REC.')
"ISPEXEC VPUT (DATA) PROFILE"
"TSS WHOOWNS VOLUME(*)"
j = 1
x = 1
do i=x to rec.0
if substr(rec.i,1,8) = 'TSS0318E' then
do
say cmd ' ' rec.i
exit
end
if substr(rec.i,1,8) = ' ' then nop
if substr(rec.i,1,8) = 'TSS0300I' then nop
else
do
"ISPEXEC VGET (DATA) PROFILE"
X=OUTTRAP('whovol.')
"ISPEXEC VPUT (DATA) PROFILE"
volume_var = strip(substr(rec.i,24,8))
'TSS WHOHAS VOLUME('volume_var')'
do y=1 to whovol.0
new.j = whovol.y
j = j + 1
end
end
end
j = j - 1
"EXECIO" j "DISKW "ddname" (STEM new. FINIS"

"ISPEXEC EDIT DATASET('"DSN"')"

"FREE F("ddname")"
address tso "DELETE '"dsn"'"