Conversation
- Deleted pipeline.variables.yml and pipeline.yml as they are no longer needed. - Removed parameters.json files for private endpoints, storage accounts, and virtual machines. - Eliminated scripts for installing pipeline agents and runtime configurations for bare metal and RHEL. - Cleaned up unnecessary PowerShell and shell scripts related to Azure DevOps agent setup. - Removed the process-aiml-resource-groups.ps1 script for managing Azure resource groups.
…nes built-in variables
- Update Bicep deployment script to use quoted variables for better handling. - Improve linter configuration with additional validation options and exclusions. - Correct email formatting in Code of Conduct for clarity. - Refine contribution guidelines for better readability and structure. - Clean up README by removing outdated external links. - Add .editorconfig for consistent coding styles across files. - Introduce .markdownlint.yaml for improved markdown linting rules.
There was a problem hiding this comment.
Pull request overview
This PR modernizes the repository’s scaffolding and CI setup while cleaning up legacy Azure DevOps–related scripts/snippets and improving documentation. It introduces reusable logging/helpers for Bash and PowerShell, standardizes linting/configuration, and adds template synchronization to keep the repo aligned with segraef/Template.
Changes:
- Modernized GitHub Actions linting (Super-Linter, PSScriptAnalyzer), added EditorConfig/markdownlint config, and added a template-sync workflow + ignore list.
- Refreshed PowerShell and Bash scaffolding (new
Write-Logmodule, new RepoTools module, new Bash template + logging helpers) and removed many obsolete/“in progress” ADO-related scripts. - Updated documentation (README structure section, CONTRIBUTING conventions, new docs note) and tightened Python dependency definitions.
Reviewed changes
Copilot reviewed 81 out of 82 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds repo structure section and fixes repo-local links/badges. |
| Python/requirements.txt | Pins requests range and adds Flask/dotenv deps. |
| Python/hibp.py | Refactors HIBP CLI into functions + adds env key handling. |
| PSScriptAnalyzerSettings.psd1 | Adds shared PSScriptAnalyzer settings baseline. |
| PowerShell/Write-Log.psm1 | Introduces a reusable PowerShell logging module. |
| PowerShell/Write-Log.ps1 | Removes old logging script template. |
| PowerShell/Update-Repos.ps1 | Refactors into dispatcher using RepoTools + Write-Log. |
| PowerShell/Update-GitHubRepos.ps1 | Removes legacy standalone GitHub updater. |
| PowerShell/Update-AdoRepos.ps1 | Removes legacy standalone Azure DevOps updater. |
| PowerShell/Snippets/Start-AzJit.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Rename-Items.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/RBAC.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Pull-Repos.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Merge-GitHubPRs.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Invoke-RESTAzureDevOps.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Get-RBACDetails.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Get-AllActions.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Generate-Text.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Delete-Items.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Create-SP.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Create-BuildValidationPolicies.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Create-Branches.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Clone-Repos.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Cleanup-LocalGitBranches.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/AVM-ModuleTester.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/ADO-BuiltInVariables.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Add-PullRequests.ps1 | Removes snippet content (cleanup). |
| PowerShell/Snippets/Add-GitHubIssue.ps1 | Removes snippet content (cleanup). |
| PowerShell/Set-AzPolicyDefinitions.ps1 | Updates script to PS7+, adds logging, strict mode, structure. |
| PowerShell/RepoTools.psm1 | Adds shared clone/update helpers for GitHub + ADO. |
| PowerShell/New-AzPipeline.ps1 | Refactors pipeline creation into structured functions and logging. |
| PowerShell/Load-Module.ps1 | Updates module loader to PS7+, strict mode, logging, safer flow. |
| PowerShell/Get-GitHubRateLimit.ps1 | Adds PS7 rate-limit monitor using gh api. |
| PowerShell/Get-DevOpsPrivateRepoFile.ps1 | Refactors into function-based PS7 script + SecureString PAT. |
| PowerShell/Export-AzDOBuildReleaseDefinitions.ps1 | Refactors export/import script to PS7+, strict mode, logging. |
| PowerShell/Activity-Simulator.ps1 | Updates script to PS7+, adds logging + improved help text. |
| PowerShell/_Template.ps1 | Refreshes PowerShell template to PS7+, ShouldProcess, strict mode, logging. |
| LICENSE | Updates copyright year range. |
| flask/server.py | Improves structure/docs and removes API-key-leaking route; tweaks debug behavior. |
| docs/ado-builtin-variables.md | Moves ADO variable notes into proper markdown docs. |
| CONTRIBUTING.md | Adds explicit repo conventions for PS/Bash/linting. |
| CODE_OF_CONDUCT.md | Replaces placeholder enforcement contact with real address. |
| CHANGELOG.md | Updates changelog entries and fixes a typo (“Initiated”). |
| Bash/log.sh | Adds shared timestamped logging helpers for Bash. |
| Bash/avm_manual_analysis.sh | Improves safety/quoting/logging and output formatting. |
| Bash/_Template.sh | Adds Bash script template using shared logger + strict mode. |
| Bash/_ | Removes stray placeholder file. |
| .templatesyncignore | Adds ignore rules to protect repo-specific files from template sync. |
| .pipelines/variables.yml | Fixes placeholder quoting/formatting. |
| .markdownlint.yaml | Adds markdownlint configuration used by CI. |
| .gitignore | Expands ignores for Python/Node/logs/temp files. |
| .github/workflows/template-sync.yml | Adds scheduled/manual template sync workflow. |
| .github/workflows/scriptanalyzer.yml | Modernizes PSScriptAnalyzer workflow and uses shared settings. |
| .github/workflows/linter.yml | Modernizes Super-Linter workflow and curates enabled validators. |
| .github/workflows/bicep_deployment.yaml | Disables push trigger; quotes vars; documents missing main.bicep. |
| .editorconfig | Adds repo-wide formatting rules. |
| _in progress/Stop-AzurePipelines.ps1 | Removes in-progress script content (cleanup). |
| _in progress/Start-AzurePipelines.ps1 | Removes in-progress script content (cleanup). |
| _in progress/process-aiml-resource-groups.ps1 | Removes in-progress script content (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/virtualMachines/vmadowin001.parameters.json | Removes in-progress ARM params (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/virtualMachines/vmadolin001.parameters.json | Removes in-progress ARM params (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/storageAccounts/parameters.json | Removes in-progress ARM params (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/scripts/script.sh | Removes in-progress agent script (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/scripts/script.ps1 | Removes in-progress agent script (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/scripts/Install-PipelineAgents.ps1 | Removes in-progress agent script (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/scripts/Install-PipelineAgent.sh | Removes in-progress agent script (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/scripts/devops_runtime_baremetal.sh | Removes in-progress agent script (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/scripts/devops_runtime_baremetal_rhel.sh | Removes in-progress agent script (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/privateEndpoints/parameters.json | Removes in-progress ARM params (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/pipeline.yml | Removes in-progress pipeline YAML (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/pipeline.variables.yml | Removes in-progress pipeline variables (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/pipeline.jobs.yml | Removes in-progress pipeline jobs (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/parameters.json | Removes in-progress ARM params (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/networkSecurityGroups/parameters.json | Removes in-progress ARM params (cleanup). |
| _in progress/prefix-dev-ae-devops-rg/keyVaults/parameters.json | Removes in-progress ARM params (cleanup). |
| _in progress/gh-ratelimit.ps1 | Removes in-progress rate-limit script (replaced by maintained version). |
| _in progress/gh-ratelimit | Removes in-progress Bash rate-limit script (cleanup). |
| _in progress/clone-azure-avm-repos.ps1 | Removes in-progress repo cloning script (cleanup). |
| _in progress/.pipelines/.templates/pipeline.jobs.script.yml | Removes in-progress ADO template (cleanup). |
| _in progress/.pipelines/.templates/pipeline.jobs.artifact.deploy.yml | Removes in-progress ADO template (cleanup). |
| _in progress/.pipelines/.templates/pipeline.artifacts.yml | Removes in-progress ADO template (cleanup). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+26
to
+30
| API_URL = 'https://haveibeenpwned.com/api/v3' | ||
| PWD_API_URL = 'https://api.pwnedpasswords.com/range' | ||
|
|
||
| # Use the API key in the headers | ||
| headers = {'hibp-api-key': API_KEY} | ||
|
|
||
| # Send the GET request to the HIBP API | ||
| response = requests.get(f'{api_url}/breachedaccount/{email}', headers=headers) | ||
|
|
||
| # Check the status code of the response | ||
| if response.status_code == 404: | ||
| print("Email not found in data breaches") | ||
| elif response.status_code != 200: | ||
| print("Error checking email") | ||
| else: | ||
| # Extract the name of the breaches from the response | ||
| breaches = [breach['Name'] for breach in response.json()] | ||
| print(f"Email found in following breaches: {', '.join(breaches)}.") | ||
|
|
||
| # Hash the password before sending it to the HIBP API | ||
| password = input("Enter your password: ") | ||
| hashed_password = hashlib.sha1(password.encode('utf-8')).hexdigest().upper() | ||
| prefix = hashed_password[:5] | ||
| suffix = hashed_password[5:] | ||
|
|
||
| # Send the GET request to the HIBP API | ||
| response = requests.get(f'{pwd_api_url}/{prefix}', headers=headers) | ||
|
|
||
| # Check the status code of the response | ||
| if response.status_code != 200: | ||
| print("Error checking password") | ||
| else: | ||
| HEADERS = {'hibp-api-key': API_KEY} |
| email: The email address to look up. | ||
| """ | ||
| try: | ||
| response = requests.get(f'{API_URL}/breachedaccount/{email}', headers=HEADERS) |
| suffix = hashed_password[5:] | ||
|
|
||
| try: | ||
| response = requests.get(f'{PWD_API_URL}/{prefix}', headers=HEADERS) |
Comment on lines
+95
to
+106
| response = requests.get(f'{API_URL}/breaches', headers=HEADERS) | ||
| except requests.RequestException as exc: | ||
| print(f"Error fetching breaches: {exc}") | ||
| return | ||
|
|
||
| # Print the status code of the response | ||
| print(response.status_code) | ||
|
|
||
| # Display the breaches | ||
| breaches = json.loads(response.text) | ||
| count = len(breaches) | ||
| for breach in breaches: |
Comment on lines
+66
to
+69
| if ($ErrorRecord) { | ||
| $trace = ($ErrorRecord.ScriptStackTrace -split "`n") -join ' <- ' | ||
| Write-Error -Message "$line | $($ErrorRecord.Exception.Message) | $trace" | ||
| return |
Comment on lines
+281
to
+285
| $fullYmlPath = $pipeline.FullName.Replace('\', '/') | ||
| $pathSplit = $fullYmlPath.Split('/') | ||
| $ymlPath = $pathSplit[-5] + '/' + $pathSplit[-4] + '/' + $pathSplit[-3] + '/' + $pathSplit[-2] + '/' + $pathSplit[-1] | ||
| $parentFolderName = $pathSplit[-3] # parent folder name | ||
| $pipelineName = $pathSplit[-3] # used as the pipeline name |
…ling; update Python scripts to enhance API interactions and add timeout management
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major scaffolding and CI modernization for the repository, focusing on improved Bash and PowerShell scripting templates, enhanced linting workflows, and automated template synchronization. It also brings documentation and configuration updates to better support maintainability and code quality.
CI and Linting Improvements
actions/checkout@v4, upgraded tosuper-linter@v7with a curated set of enabled linters, and modernized the PSScriptAnalyzer workflow to use the latest version with shared settings and stricter error handling. Linting now runs on both push and pull request events, and permissions are set more securely. (.github/workflows/linter.yml,.github/workflows/scriptanalyzer.yml,.markdownlint.yaml, [1] [2] [3].editorconfigto enforce consistent code style and whitespace across the repository. (.editorconfig, .editorconfigR1-R16)Bash and PowerShell Scaffolding
_Template.sh(template script with logging) andlog.sh(timestamped logging helpers). Enhanced theavm_manual_analysis.shscript with robust logging, improved variable quoting, and clearer statistical summaries. (Bash/_Template.sh,Bash/log.sh,Bash/avm_manual_analysis.sh, [1] [2] [3] [4]CHANGELOG.md, CHANGELOG.mdL9-R27)Template Synchronization
segraef/Template), while protecting repository-specific files via.templatesyncignore. (.github/workflows/template-sync.yml,.templatesyncignore, [1] [2]Documentation and Configuration
CHANGELOG.md, CHANGELOG.mdL9-R27).pipelines/variables.yml, .pipelines/variables.ymlL4-R6)Other Notable Changes
Bash/avm_manual_analysis.sh, Bash/avm_manual_analysis.shL12-R179)main.bicepfile is added. (.github/workflows/bicep_deployment.yaml, [1] [2]# ChangeFeel free to remove this sample text
Type of Change
Please delete options that are not relevant.
Checklist