CLI tool to identify cross project repo access in Azure DevOps.
Project description
cross-project-cluck
Helps identify cross-project repo access in Azure DevOps.
What does it do?
For each pipeline run harvested (API limited to latest 1000), it adds a row for each repository accessed. Determines if the access is cross-project. Sets the status to "REVIEW" for cross-project access or "OK" for same-project access.
It outputs a JSON file and matching CSV. It also outputs a list of projects it found. Use the --simulate-approve-all flag to output a list of instructions if you were to set granular permissions at repo level.
[
{
"home_project": "HOME PROJECT",
"run": "Link to the Pipeline Run",
"project": "HOME PROJECT",
"repo": "Repo Accessed",
"branch": "Branch reference",
"cross_project": false,
"status": "OK"
},
{
"home_project": "HOME PROJECT",
"run": "Link to the Pipeline Run",
"project": "CROSS PROJECT",
"repo": "Repo Accessed",
"branch": "Branch reference",
"cross_project": true,
"status": "REVIEW"
}
]
Installation
Install via pip:
pip install cross-project-cluck
Usage
Run the tool using the CLI:
-
With arguments:
cluck --simulate-approve-all --organization my_org --pat_token my_secret_token
-
Without arguments (uses
config.jsonor environment variables):cluck --simulate-approve-all
Configuration
You can provide organization and pat_token in the following ways:
-
Command-line arguments:
cluck --organization my_org --pat_token my_secret_token
-
Environment variables:
export ORGANIZATION=my_org export PAT_TOKEN=my_secret_token cluck
-
config.jsonfile:Create a
config.jsonfile:{ "organization": "my_org", "pat_token": "my_secret_token" }
Priority
The tool checks for configuration in this order:
- Command-line arguments
- Environment variables
config.json
If not using pip, use the python code directly:
python cross_project_cluck.py -h
python cross_project_cluck.py --organization my_org --pat_token my_secret_token
python cross_project_cluck.py --simulate-approve-all --organization my_org --pat_token my_secret_token
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cross_project_cluck-1.0.6.tar.gz.
File metadata
- Download URL: cross_project_cluck-1.0.6.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4d3bf8351d98c0478969905696dcd732e06f725af695009f3683dfb6897e7f
|
|
| MD5 |
83d31e8ce53ff33fc8969b3cb2531913
|
|
| BLAKE2b-256 |
fb6c396c762f8e51091300377ba3857fb27c06c766ae6a09e39a0228ab6d1f82
|
File details
Details for the file cross_project_cluck-1.0.6-py3-none-any.whl.
File metadata
- Download URL: cross_project_cluck-1.0.6-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be54314bf20517e4cfd68996550757e6451684e7d64eb7cae1ca2d26cd64267c
|
|
| MD5 |
c585326cb849d048344fdb338624c929
|
|
| BLAKE2b-256 |
c568928c45703115ec9512d89407bdca3040969c208e54e10b853f89f603c876
|