Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
186ec5c
first pass at adding pipeline
wdower Jan 22, 2026
f87abd1
allowing pipeline to run on actions branch for testing
wdower Jan 22, 2026
ef11cfe
inspec --> cinc-auditor
wdower Jan 22, 2026
dff58e8
cleaning up Gemfile
wdower Jan 22, 2026
5ac863b
typo in version check
wdower Jan 22, 2026
332285c
typo in input file flag
wdower Jan 22, 2026
d3ce2c7
adjusting secret var names
wdower Jan 22, 2026
2cc6fe0
missing multiline indicator
wdower Jan 22, 2026
d626b12
swapping back to inspec gem to remove the duped deps warning
wdower Jan 22, 2026
8b9eee7
oci region is just a var, not a secret; also swapping back to cinc-au…
wdower Jan 22, 2026
9fba5b7
fixing incorrect var invocation
wdower Jan 22, 2026
3cdb5e0
adding precomit config
wdower Jan 22, 2026
caff4d1
quoting inputs
wdower Jan 22, 2026
33da4ce
realized the input for tenancy_ocid was a null and not an empty string
wdower Jan 22, 2026
b2e6bde
Merge branch 'main' into actions
seanlongcc Jan 26, 2026
dd9cf86
ci: change env for heimdall url
seanlongcc Jan 26, 2026
6fdcc51
ci: update naming schemes
seanlongcc Jan 26, 2026
7784a48
Merge branch 'main' into actions
seanlongcc Jan 26, 2026
2c07755
merge with main
seanlongcc Jan 26, 2026
05803b2
Merge branch 'main' into actions
seanlongcc Jan 29, 2026
dc70b26
wip: check oci and python version, try new oci install method
seanlongcc Jan 29, 2026
98c6ee0
wip: add oci cli to path
seanlongcc Jan 29, 2026
2fbf736
wip: configure oci cli
seanlongcc Jan 29, 2026
a4f7073
wip: try new credentials
seanlongcc Jan 29, 2026
4f12b0e
wip: use new cli tenancy in inspec command
seanlongcc Jan 29, 2026
5dcecfd
wip: try removing input
seanlongcc Jan 29, 2026
2d90acb
Merge branch 'main' into actions
seanlongcc Feb 4, 2026
48ea25b
wip: check if we are authed on the same step of running the profile
seanlongcc Feb 4, 2026
33bebcc
wip: output contents of input file
seanlongcc Feb 4, 2026
9ab2332
Merge branch 'main' into actions
seanlongcc Feb 4, 2026
9234587
wip: check what a control gets us when not running in inspec
seanlongcc Feb 4, 2026
7849411
ci: remove double input flag
seanlongcc Feb 4, 2026
23b16be
chore: remove test file
seanlongcc Feb 4, 2026
a543ad5
chore: removed testing file
seanlongcc Feb 4, 2026
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
120 changes: 120 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
name: CIS OCI Foundations v3.0.0

on:
push:
branches:
- actions
- main
pull_request:

jobs:
my-job:
name: Validate Profile
runs-on: ubuntu-latest
env:
INPUT_FILE: example.inputs.yml
RESULTS_FILE: oci_results.json
THRESHOLD_FILE: example.threshold.yml
HEIMDALL_URL: ${{ vars.SAF_HEIMDALL_URL }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_REGION: ${{ vars.SAF_OCI_CLI_REGION }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}

steps:
- name: Install needed packages
run: sudo apt-get install -y jq curl

- name: Install OCI
run: |
curl -L -o install.sh https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh
bash install.sh --accept-all-defaults
echo "$HOME/bin" >> $GITHUB_PATH

- name: Configure OCI CLI
run: |
mkdir -p ~/.oci
printf "%s" "$OCI_CLI_KEY_CONTENT" > ~/.oci/oci_api_key.pem
chmod 600 ~/.oci/oci_api_key.pem
cat > ~/.oci/config <<EOF
[DEFAULT]
user=$OCI_CLI_USER
fingerprint=$OCI_CLI_FINGERPRINT
tenancy=$OCI_CLI_TENANCY
region=$OCI_CLI_REGION
key_file=~/.oci/oci_api_key.pem
EOF
chmod 600 ~/.oci/config

- name: Verify OCI CLI auth and version
run: |
set -euo pipefail
test -s ~/.oci/config
test -s ~/.oci/oci_api_key.pem
oci --version
oci iam user get --user-id "$OCI_CLI_USER" --raw-output >/dev/null

- name: Check out repository
uses: actions/checkout@v4

- name: Clone full repository so we can push
run: git fetch --prune --unshallow

- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV

- name: Confirm git commit SHA output
run: echo ${{ env.COMMIT_SHORT_SHA }}

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.0"

- name: Disable ri and rdoc
run: 'echo "gem: --no-document" >> ~/.gemrc'

- name: Bundle Install
run: bundle install

- name: Installed Inspec
run: bundle exec cinc-auditor --version

- name: Vendor the InSpec Profile
run: bundle exec cinc-auditor vendor --overwrite

- name: Lint the Inspec profile
run: bundle exec cinc-auditor check .

- name: Run the Profile
run: |
bundle exec cinc-auditor exec . \
--input-file="${{ env.INPUT_FILE }}" \
--input tenancy_ocid="${{ secrets.OCI_CLI_TENANCY }}" detector_recipe_ocid="${{ secrets.SAF_OCI_DETECTOR_RECIPE_OCID }}" \
--reporter cli json:${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }} --enhanced-outcomes --filter-empty-profiles || true

- name: Save Test Result JSON
uses: actions/upload-artifact@v4
with:
name: ${{ github.workflow }}-${{ env.COMMIT_SHORT_SHA }}-results
path: |
./${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }}

- name: Upload to Heimdall
run: |
curl -# -s -F data=@${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }} -F "filename=${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE}}" -F "public=true" -F "evaluationTags=${{ env.COMMIT_SHORT_SHA }},${{ github.repository }},${{ github.workflow }}" -H "Authorization: Api-Key ${{ secrets.SAF_HEIMDALL_UPLOAD_KEY }}" "${{ env.HEIMDALL_URL }}/evaluations"

- name: Display our ${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }} results summary
uses: mitre/saf_action@v1
with:
command_string: "view summary -i ${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }}"

- name: Ensure ${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }} meets our results threshold
uses: mitre/saf_action@v1
with:
command_string: "validate threshold -i ${{ env.COMMIT_SHORT_SHA }}-${{ env.RESULTS_FILE }} -F ${{ env.THRESHOLD_FILE }}"
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint
19 changes: 2 additions & 17 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
# frozen_string_literal: true

source 'https://rubygems.org'
gem 'berkshelf'
gem 'highline'
gem 'kitchen-ansible'
gem 'kitchen-docker'
gem 'kitchen-dokken'
gem 'kitchen-ec2'
gem 'kitchen-inspec'
gem 'kitchen-sync'
gem 'kitchen-vagrant'
gem 'pry-byebug'
gem 'rake'
gem 'rubocop'
gem 'rubocop-rake'
gem 'test-kitchen'
gem 'train-awsssm'
gem 'syslog'
gem 'csv'

source 'https://rubygems.cinc.sh/' do
gem 'chef-config'
gem 'chef-utils'
gem 'cinc-auditor-bin'
gem 'inspec'
gem 'inspec-core'
end
Loading