Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use env variables for user-set values #1117

Merged
merged 2 commits into from
Oct 1, 2021
Merged

Conversation

skedwards88
Copy link
Contributor

In updating the deployment guides, it felt clearer to make all user-set values be environment variables that the user can set at the top of the workflow file. (Similar to the azure and GKE workflows.) The docs use this format in the example workflow. This PR updates the AWS starter workflow to use the same strategy so that the starter workflow and corresponding docs align.

Pre-requisites


Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.


Tasks

For all workflows, the workflow:

  • Should be contained in a .yml file with the language or platform as its filename, in lower, kebab-cased format (for example, docker-image.yml). Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET").
  • Should use sentence case for the names of workflows and steps (for example, "Run tests").
  • Should be named only by the name of the language or platform (for example, "Go", not "Go CI" or "Go Build").
  • Should include comments in the workflow for any parts that are not obvious or could use clarification.

For CI workflows, the workflow:

  • Should be preserved under the ci directory.
  • Should include a matching ci/properties/*.properties.json file (for example, ci/properties/docker-publish.properties.json).
  • Should run on push to branches: [ $default-branch ] and pull_request to branches: [ $default-branch ].
  • Packaging workflows should run on release with types: [ created ].
  • Publishing workflows should have a filename that is the name of the language or platform, in lower case, followed by "-publish" (for example, docker-publish.yml).

For Code Scanning workflows, the workflow:

  • Should be preserved under the code-scanning directory.
  • Should include a matching code-scanning/properties/*.properties.json file (for example, code-scanning/properties/codeql.properties.json), with properties set as follows:
    • name: Name of the Code Scanning integration.
    • organization: Name of the organization producing the Code Scanning integration.
    • description: Short description of the Code Scanning integration.
    • categories: Array of languages supported by the Code Scanning integration.
    • iconName: Name of the SVG logo representing the Code Scanning integration. This SVG logo must be present in the icons directory.
  • Should run on push to branches: [ $default-branch, $protected-branches ] and pull_request to branches: [ $default-branch ]. We also recommend a schedule trigger of cron: $cron-weekly (for example, codeql.yml).

Some general notes:

  • This workflow must only use actions that are produced by GitHub, in the actions organization, or
  • This workflow must only use actions that are produced by the language or ecosystem that the workflow supports. These actions must be published to the GitHub Marketplace. We require that these actions be referenced using the full 40 character hash of the action's commit instead of a tag. Additionally, workflows must include the following comment at the top of the workflow file:
    # This workflow uses actions that are not certified by GitHub.
    # They are provided by a third-party and are governed by
    # separate terms of service, privacy policy, and support
    # documentation.
    
  • Automation and CI workflows should not send data to any 3rd party service except for the purposes of installing dependencies.
  • Automation and CI workflows cannot be dependent on a paid service or product.

@skedwards88 skedwards88 requested a review from a team as a code owner September 24, 2021 01:11
@joshmgross joshmgross merged commit 596b345 into actions:main Oct 1, 2021
ashwinsangem pushed a commit that referenced this pull request Oct 8, 2021
* Added Cloudrail according to instructions and existing examples

* Adding Cloudrail according to documentation and examples

* Oops

* Add original Fortify on Demand workflow

* Update Fortify on Demand workflow

* Update Fortify on Demand supported languages

* Add 3rd-party GitHub Actions disclaimer

* Sysdig Secure Inline Scan with SARIF report to starter workflows

* Added some extra comments, Github Actions V2 and changed env vars

* Reviews from PR #1110

* Adding 'Dockerfile' to category list

* Update according to PR review comments

* File renames as requested in PR comments

* Revert "Azure Data Factory CI starter workflow (#1111)" (#1146)

This reverts commit 7f30309.

* use env variables for user-set values (#1117)

Co-authored-by: Josh Gross <[email protected]>

* Apply suggestions from nickfyson's code review

Co-authored-by: Nick Fyson <[email protected]>

* removing "deployment" templates from sync-ghes (#1127)

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Changed svg logo

* Rename sysdig.svg to sysdig-scan.svg

* Switched svg logo (again) for a better fit

* Rename fortify.json to fortify.properties.json

Co-authored-by: Yoni Leitersdorf <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Manuel Boira Cuevas <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Nick Fyson <[email protected]>
Co-authored-by: Sarah Edwards <[email protected]>
Co-authored-by: Josh Gross <[email protected]>
Co-authored-by: Aparna Ravindra <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
ashwinsangem pushed a commit that referenced this pull request Oct 22, 2021
* Added Cloudrail according to instructions and existing examples

* Adding Cloudrail according to documentation and examples

* Oops

* Add original Fortify on Demand workflow

* Update Fortify on Demand workflow

* Update Fortify on Demand supported languages

* Add 3rd-party GitHub Actions disclaimer

* Sysdig Secure Inline Scan with SARIF report to starter workflows

* Added some extra comments, Github Actions V2 and changed env vars

* Reviews from PR #1110

* Adding 'Dockerfile' to category list

* Update according to PR review comments

* File renames as requested in PR comments

* Revert "Azure Data Factory CI starter workflow (#1111)" (#1146)

This reverts commit 7f30309.

* use env variables for user-set values (#1117)

Co-authored-by: Josh Gross <[email protected]>

* Apply suggestions from nickfyson's code review

Co-authored-by: Nick Fyson <[email protected]>

* removing "deployment" templates from sync-ghes (#1127)

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Changed svg logo

* Rename sysdig.svg to sysdig-scan.svg

* Switched svg logo (again) for a better fit

* Rename fortify.json to fortify.properties.json

* Correct character-case of "c" in Cloudrail

* AWS template also used Docker

* trigger on push instead of release (#1157)

Co-authored-by: Josh Gross <[email protected]>

* Added new templates for 3 clouds.

* Revert "Added new templates for 3 clouds."

This reverts commit c765d63.

* Add workflow for Microsoft C++ Code Analysis

* Updated action to meet guidelines

* correct typo in msvc.properties.json

Co-authored-by: Yoni Leitersdorf <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Manuel Boira Cuevas <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Nick Fyson <[email protected]>
Co-authored-by: Sarah Edwards <[email protected]>
Co-authored-by: Josh Gross <[email protected]>
Co-authored-by: Aparna Ravindra <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Daniel Winsor <[email protected]>
ashwinsangem pushed a commit that referenced this pull request Oct 25, 2021
* Added Cloudrail according to instructions and existing examples

* Adding Cloudrail according to documentation and examples

* Oops

* Add original Fortify on Demand workflow

* Update Fortify on Demand workflow

* Update Fortify on Demand supported languages

* Add 3rd-party GitHub Actions disclaimer

* Sysdig Secure Inline Scan with SARIF report to starter workflows

* Added some extra comments, Github Actions V2 and changed env vars

* Reviews from PR #1110

* Adding 'Dockerfile' to category list

* Update according to PR review comments

* File renames as requested in PR comments

* Revert "Azure Data Factory CI starter workflow (#1111)" (#1146)

This reverts commit 7f30309.

* use env variables for user-set values (#1117)

Co-authored-by: Josh Gross <[email protected]>

* Apply suggestions from nickfyson's code review

Co-authored-by: Nick Fyson <[email protected]>

* removing "deployment" templates from sync-ghes (#1127)

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Changed svg logo

* Rename sysdig.svg to sysdig-scan.svg

* Switched svg logo (again) for a better fit

* Rename fortify.json to fortify.properties.json

* Correct character-case of "c" in Cloudrail

* AWS template also used Docker

* trigger on push instead of release (#1157)

Co-authored-by: Josh Gross <[email protected]>

* Added new templates for 3 clouds.

* Revert "Added new templates for 3 clouds."

This reverts commit c765d63.

* Add workflow for Microsoft C++ Code Analysis

* Updated action to meet guidelines

* correct typo in msvc.properties.json

* Removed the dummy templates used in bug_bash.

Co-authored-by: Yoni Leitersdorf <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Manuel Boira Cuevas <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Nick Fyson <[email protected]>
Co-authored-by: Sarah Edwards <[email protected]>
Co-authored-by: Josh Gross <[email protected]>
Co-authored-by: Aparna Ravindra <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Daniel Winsor <[email protected]>
ashwinsangem pushed a commit that referenced this pull request Nov 15, 2021
* Added Cloudrail according to instructions and existing examples

* Adding Cloudrail according to documentation and examples

* Oops

* Add original Fortify on Demand workflow

* Update Fortify on Demand workflow

* Update Fortify on Demand supported languages

* Add 3rd-party GitHub Actions disclaimer

* Sysdig Secure Inline Scan with SARIF report to starter workflows

* Added some extra comments, Github Actions V2 and changed env vars

* Reviews from PR #1110

* Adding 'Dockerfile' to category list

* Update according to PR review comments

* File renames as requested in PR comments

* Revert "Azure Data Factory CI starter workflow (#1111)" (#1146)

This reverts commit 7f30309.

* use env variables for user-set values (#1117)

Co-authored-by: Josh Gross <[email protected]>

* Apply suggestions from nickfyson's code review

Co-authored-by: Nick Fyson <[email protected]>

* removing "deployment" templates from sync-ghes (#1127)

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Changed svg logo

* Rename sysdig.svg to sysdig-scan.svg

* Switched svg logo (again) for a better fit

* Rename fortify.json to fortify.properties.json

* Correct character-case of "c" in Cloudrail

* AWS template also used Docker

* trigger on push instead of release (#1157)

Co-authored-by: Josh Gross <[email protected]>

* Adding MobSF starter workflow

* Adhering to pull request guidelines

* python: update to use python 3.10

Signed-off-by: Rui Chen <[email protected]>

* Added new templates for 3 clouds.

* Revert "Added new templates for 3 clouds."

This reverts commit c765d63.

* Add ruby and update workflow

* Add workflow for Microsoft C++ Code Analysis

* Updated action to meet guidelines

* quote the version strings

* correct typo in msvc.properties.json

* Update codeql.properties.json

* Update code-scanning/properties/codeql.properties.json

Co-authored-by: Arthur Baars <[email protected]>

* Update codeql.properties.json

* Update codeql.properties.json

* Update code-scanning/mobsf.yml

Co-authored-by: Nick Fyson <[email protected]>

* Update code-scanning/properties/mobsf.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Fixed typo in workflow that will cause every run to fail

* Update commit SHA

* r: use setup-r@1 and include r@4 for starter (#1169)

* r: use setup-r@1 and include r@4 for starter

Signed-off-by: Rui Chen <[email protected]>

* use sha instead of tag for external action

Co-authored-by: Josh Gross <[email protected]>

Co-authored-by: Josh Gross <[email protected]>

* elixir: refresh dependencies (#1212)

- setup action got renamed into `setup-beam`
- update elixir and erlang versions

Co-authored-by: Yoni Leitersdorf <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Manuel Boira Cuevas <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Nick Fyson <[email protected]>
Co-authored-by: Sarah Edwards <[email protected]>
Co-authored-by: Josh Gross <[email protected]>
Co-authored-by: Aparna Ravindra <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Abir Majumdar <[email protected]>
Co-authored-by: Rui Chen <[email protected]>
Co-authored-by: David Verdeguer <[email protected]>
Co-authored-by: Daniel Winsor <[email protected]>
Co-authored-by: David Verdeguer <[email protected]>
Co-authored-by: Arthur Baars <[email protected]>
Co-authored-by: Abir Majumdar <[email protected]>
Co-authored-by: Marco Gario <[email protected]>
Co-authored-by: Andy McKay <[email protected]>
ashwinsangem pushed a commit that referenced this pull request Nov 15, 2021
* Added Cloudrail according to instructions and existing examples

* Adding Cloudrail according to documentation and examples

* Oops

* Add original Fortify on Demand workflow

* Update Fortify on Demand workflow

* Update Fortify on Demand supported languages

* Add 3rd-party GitHub Actions disclaimer

* Sysdig Secure Inline Scan with SARIF report to starter workflows

* Added some extra comments, Github Actions V2 and changed env vars

* Reviews from PR #1110

* Adding 'Dockerfile' to category list

* Update according to PR review comments

* File renames as requested in PR comments

* Revert "Azure Data Factory CI starter workflow (#1111)" (#1146)

This reverts commit 7f30309.

* use env variables for user-set values (#1117)

Co-authored-by: Josh Gross <[email protected]>

* Apply suggestions from nickfyson's code review

Co-authored-by: Nick Fyson <[email protected]>

* removing "deployment" templates from sync-ghes (#1127)

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Update code-scanning/properties/sysdig-scan.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Changed svg logo

* Rename sysdig.svg to sysdig-scan.svg

* Switched svg logo (again) for a better fit

* Rename fortify.json to fortify.properties.json

* Correct character-case of "c" in Cloudrail

* AWS template also used Docker

* trigger on push instead of release (#1157)

Co-authored-by: Josh Gross <[email protected]>

* Adding MobSF starter workflow

* Adhering to pull request guidelines

* python: update to use python 3.10

Signed-off-by: Rui Chen <[email protected]>

* Added new templates for 3 clouds.

* Revert "Added new templates for 3 clouds."

This reverts commit c765d63.

* Add ruby and update workflow

* Add workflow for Microsoft C++ Code Analysis

* Updated action to meet guidelines

* quote the version strings

* correct typo in msvc.properties.json

* Update codeql.properties.json

* Update code-scanning/properties/codeql.properties.json

Co-authored-by: Arthur Baars <[email protected]>

* Update codeql.properties.json

* Update codeql.properties.json

* Update code-scanning/mobsf.yml

Co-authored-by: Nick Fyson <[email protected]>

* Update code-scanning/properties/mobsf.properties.json

Co-authored-by: Nick Fyson <[email protected]>

* Fixed typo in workflow that will cause every run to fail

* Update commit SHA

* r: use setup-r@1 and include r@4 for starter (#1169)

* r: use setup-r@1 and include r@4 for starter

Signed-off-by: Rui Chen <[email protected]>

* use sha instead of tag for external action

Co-authored-by: Josh Gross <[email protected]>

Co-authored-by: Josh Gross <[email protected]>

* elixir: refresh dependencies (#1212)

- setup action got renamed into `setup-beam`
- update elixir and erlang versions

* Updated to main branch version.

Co-authored-by: Yoni Leitersdorf <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Ruud Senden <[email protected]>
Co-authored-by: Manuel Boira Cuevas <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Nick Fyson <[email protected]>
Co-authored-by: Sarah Edwards <[email protected]>
Co-authored-by: Josh Gross <[email protected]>
Co-authored-by: Aparna Ravindra <[email protected]>
Co-authored-by: manuelbcd <[email protected]>
Co-authored-by: Abir Majumdar <[email protected]>
Co-authored-by: Rui Chen <[email protected]>
Co-authored-by: David Verdeguer <[email protected]>
Co-authored-by: Daniel Winsor <[email protected]>
Co-authored-by: David Verdeguer <[email protected]>
Co-authored-by: Arthur Baars <[email protected]>
Co-authored-by: Abir Majumdar <[email protected]>
Co-authored-by: Marco Gario <[email protected]>
Co-authored-by: Andy McKay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants