{"id":19260509,"url":"https://github.com/mitre/inspec-profile-developer-course-lab-environment","last_synced_at":"2025-10-04T07:56:22.039Z","repository":{"id":39789590,"uuid":"459671965","full_name":"mitre/inspec-profile-developer-course-lab-environment","owner":"mitre","description":"The InSpec Profile Developer Lab is a GitHub Codespaces environment that makes it quick and easy for you to start learning and working on your own InSpec profiles.","archived":false,"fork":false,"pushed_at":"2022-06-13T13:05:16.000Z","size":594,"stargazers_count":2,"open_issues_count":0,"forks_count":32,"subscribers_count":21,"default_branch":"students","last_synced_at":"2025-04-21T16:41:40.226Z","etag":null,"topics":["chef-inspec","cinc","cinc-auditor","inspec","mitre-corporation","mitre-inspec","mitre-saf"],"latest_commit_sha":null,"homepage":"https://mitre.github.io/inspec-developer","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-15T17:02:40.000Z","updated_at":"2024-07-23T16:24:40.000Z","dependencies_parsed_at":"2022-08-27T20:12:41.134Z","dependency_job_id":null,"html_url":"https://github.com/mitre/inspec-profile-developer-course-lab-environment","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mitre/inspec-profile-developer-course-lab-environment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Finspec-profile-developer-course-lab-environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Finspec-profile-developer-course-lab-environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Finspec-profile-developer-course-lab-environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Finspec-profile-developer-course-lab-environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitre","download_url":"https://codeload.github.com/mitre/inspec-profile-developer-course-lab-environment/tar.gz/refs/heads/students","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Finspec-profile-developer-course-lab-environment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278283453,"owners_count":25961311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef-inspec","cinc","cinc-auditor","inspec","mitre-corporation","mitre-inspec","mitre-saf"],"created_at":"2024-11-09T19:21:24.927Z","updated_at":"2025-10-04T07:56:22.019Z","avatar_url":"https://github.com/mitre.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inspec-profile-developer-course-lab-environment\n\nThe InSpec Profile Developer Lab is a GitHub Codespaces environment that makes it quick and easy for you to start learning and working on your own InSpec profiles.\n\nIt is also a great quick and easy way to test and demonstrate what you have learned or collaborate with others to get help with what you are working on.\n## Overview of the Lab\n\nThe Codespece is setup to be very low overhead, we use the base 'Codespace Linux Community Image' along with a simple `setup.sh` script to quickly add the tools you need to get started easily along with two containers to act as testing targets.\n### Lab Components\n\n- CodeSpaces Linux Base Community Image\n  - \u003chttps://github.com/microsoft/vscode-dev-containers/tree/main/containers/codespaces-linux\u003e\n- InSpec Omnitruk install of the latest InSpec\n  - `curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -c stable -P inspec`\n- MITRE SAF CLI\n  - \u003chttps://saf-cli.mitre.org\u003e\n- Docker Compose File which starts:\n  - RedHat UBI8 Container\n  - NGINX Web Server Container\n\n## Using the Lab\n\nTo use the lab:\n1. Fork the repository into your GitHub Account\n2. Click the 'Code' Drop down and select, 'Configure and Create Codespace'\n3. Select 'Configure and Create Codespace', we suggest the larger instance with greater memory, at least 64G.\n4. Wait for your Codespace instance to start and finish its startup scripts.\n5. We will then install three extentions - Click the 'L' shaped box on the left-hand bar. Search and install these three extentions.\n - Ruby\n - Docker\n - Prettier\n7. In the terminal, run the `lab-setup.sh` script\n\n```sh\nsource ./lab-setup.sh\n```\n\nOnce, this has finished, you should have InSpec installed in your environment, the MITRE SAF CLI and two running docker containers - tagged as `nginx` and `redhat8`.\n\n8. Once complete, you can verify the setup in your environment with the `verify-lab.sh` script:\n\n```sh\n./verify-lab.sh\n```\n\nWhich should return something like:\n\n```sh\nMITRE SAF version: \n@mitre/saf/1.1.6 darwin-arm64 node-v18.2.0\nInSpec version: \n5.14.0\nDocker is running the container(s): \nCONTAINER ID   IMAGE          COMMAND                  CREATED        STATUS         PORTS                NAMES\n4f0ceb9b5974   nginx:latest   \"/docker-entrypoint.…\"   2 months ago   Up 6 minutes   0.0.0.0:80-\u003e80/tcp   nginx\n```\n## Stopping / Pausing and Restarting your Codespace\n\n### Stoping/Pausing your Codespace\n\nYou are able to `stop` or `pause` your codespacce in a couple of ways. The easiest way, is to go to the Codespaces page while you are signed into your GitHub account:\n\n- \u003chttps://github.com/codespaces\u003e\n\nThis will list all your Codespaces and let you stop and start them as needed.\n\n1. Click on the `...`\n2. Select `Stop Codespace`\n3. Your Codespace should now be `stopped`\n\nIt also makes it easily to `pause` your work so that you don't use resources or risk an error and have lost work.\n\n#### Closing the Browser Window\n\nIf you just close your window, your Codespace will automatically `pause` itself after a few min of inactivity. However, this is not quite as stable as following the recomended workflow above, but if you do close your browser by accident, it should be fine.\n\n### Restarting your Codespace\n\nOn your return you can go back to:\n\n- \u003chttps://github.com/codespaces\u003e\n\nYou will see your Codoespace listed in the table. \n\n1. Click on the `...` on the right, and select one of the startup options.\n2. This will restart your Codespace where you left it.\n\n***Docker Container Restart May be Needed*** \n\nYou may have to restart your docker containers again after you restart your Codespace. To do this:\n\n1. Run: `docker ps`\n2. If your containers are not running, then just run: `lab-setup.sh`\n3. Run: `docker ps` again to verify that your containers are again running in your environment.\n\n## Adding Services and Software to your Codespace\n\nYour Codespace is yours to command, you have full `sudo` access and can install any software or services you like, run databases, web-servers, etc. and expose any ports that you might need to do your work.\n\n## Createing a Pull Request\n\n- \u003chttps://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github\u003e\n\nGo for it and if for some reason you break your environment, just start a new one.\n### NOTICE\n\n© 2018-2022 The MITRE Corporation.\n\nApproved for Public Release; Distribution Unlimited. Case Number 18-3678.\n\n### NOTICE\n\nMITRE hereby grants express written permission to use, reproduce, distribute, modify, and otherwise leverage this software to the extent permitted by the licensed terms provided in the LICENSE.md file included with this project.\n\n### NOTICE\n\nThis software was produced for the U. S. Government under Contract Number HHSM-500-2012-00008I, and is subject to Federal Acquisition Regulation Clause 52.227-14, Rights in Data-General.\n\nNo other use other than that granted to the U. S. Government, or to those acting on behalf of the U. S. Government under that Clause is authorized without the express written permission of The MITRE Corporation.\n\nFor further information, please contact The MITRE Corporation, Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitre%2Finspec-profile-developer-course-lab-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitre%2Finspec-profile-developer-course-lab-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitre%2Finspec-profile-developer-course-lab-environment/lists"}