Skip to content

Commit

Permalink
Merge pull request #18 from mitre/sujay-dev
Browse files Browse the repository at this point in the history
test pipeline
  • Loading branch information
skandwal-mitre authored Feb 20, 2025
2 parents 71a9bba + 0008252 commit 6b548db
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
- name: Install Packages
run: sudo apt-get install -y jq curl

- name: Install Az Module
- name: Install Az and MgGraph Modules
run: |
Install-Module -Name Az -AllowClobber -Scope CurrentUser -Force
Import-Module Az
Install-Module -Name Microsoft.Graph -AllowClobber -Scope CurrentUser -Force
Import-Module Microsoft.Graph
If($null -eq (get-module -listavailable -name "az")){install-module az -Force -AllowClobber}
If($null -eq (get-module -name "az")){import-module az}
If($null -eq (get-module -listavailable -name "microsoft.graph")){install-module microsoft.graph -Force -AllowClobber}
If($null -eq (get-module -name "microsoft.graph")){import-module microsoft.graph}
shell: pwsh

- name: Check-out Repository
Expand Down Expand Up @@ -92,7 +92,13 @@ jobs:
- name: Run InSpec Profile
run: |
bundle exec inspec exec . --controls=azure-foundations-cis-6.2.1 azure-foundations-cis-6.2.2 --input client_id=${{secrets.AZURE_CLIENT_ID}} tenant_id=${{secrets.AZURE_TENANT_ID}} client_secret=${{secrets.AZURE_CLIENT_SECRET}} --input-file=inputs_template.yml --reporter cli json:${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }} --enhanced-outcomes --filter-empty-profiles || true
bundle exec inspec exec . \
--controls=azure-foundations-cis-6.2.1 azure-foundations-cis-6.2.2 \
--input client_id=${{ secrets.AZURE_CLIENT_ID }} tenant_id=${{ secrets.AZURE_TENANT_ID }} client_secret=${{ secrets.AZURE_CLIENT_SECRET }} \
--input-file=inputs_template.yml \
--reporter cli json:${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }} \
--enhanced-outcomes \
--filter-empty-profiles || true
- name: Save Test Results
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 6b548db

Please sign in to comment.