diff --git a/.github/workflows/Ia-sin-restricciones.prompt.yml.txt b/.github/workflows/Ia-sin-restricciones.prompt.yml.txt new file mode 100644 index 0000000000..ca04266a2b --- /dev/null +++ b/.github/workflows/Ia-sin-restricciones.prompt.yml.txt @@ -0,0 +1 @@ +# Este archivo será eliminado - no es un workflow válido diff --git a/.github/workflows/generator-generic-ossf-slsa3-publish.yml b/.github/workflows/generator-generic-ossf-slsa3-publish.yml new file mode 100644 index 0000000000..e6520027d6 --- /dev/null +++ b/.github/workflows/generator-generic-ossf-slsa3-publish.yml @@ -0,0 +1 @@ +# Este archivo fue movido a code-scanning/slsa-generator.yml diff --git a/README.md b/README.md index c069342121..8dc38ff24f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ These are the workflow files for helping people get started with GitHub Actions. Thank you for your interest in this GitHub repo, however, right now we are not taking contributions. -We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features we’re working on and what stage they’re in. +We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are always looking to improve our processes and expand our offerings. We are taking the following steps to better direct requests related to GitHub Actions, including: @@ -37,7 +37,7 @@ You are welcome to still raise bugs in this repo. * [pages](pages): solutions for Pages workflows * [icons](icons): svg icons for the relevant template -Each workflow must be written in YAML and have a `.yml` extension. They also need a corresponding `.properties.json` file that contains extra metadata about the workflow (this is displayed in the GitHub.com UI). +Each workflow must be written in YAML and have a `.yml` extension. They also need a corresponding `.properties.json` file that contains extra metadata about the workflow (this is displayed in the workflow selection experience). For example: `ci/django.yml` and `ci/properties/django.properties.json`. @@ -45,9 +45,9 @@ For example: `ci/django.yml` and `ci/properties/django.properties.json`. * `name`: the name shown in onboarding. This property is unique within the repository. * `description`: the description shown in onboarding -* `iconName`: the icon name in the relevant folder, for example, `django` should have an icon `icons/django.svg`. Only SVG is supported at this time. Another option is to use [octicon](https://primer.style/octicons/). The format to use an octicon is `octicon <>`. Example: `octicon person` +* `iconName`: the icon name in the relevant folder, for example, `django` should have an icon `icons/django.svg`. Only SVG is supported at this time. Another option is to use [octicons](https://primer.style/octicons/). * `creator`: creator of the template shown in onboarding. All the workflow templates from an author will have the same `creator` field. -* `categories`: the categories that it will be shown under. Choose at least one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) and the list of tech stacks available [here](https://github.com/github-starter-workflows/repo-analysis-partner/blob/main/tech_stacks.yml). When a user views the available templates, those templates that match the language and tech stacks will feature more prominently. +* `categories`: the categories that it will be shown under. Choose at least one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/codeql-action/blob/main/src/languages.ts). ### Categories * continuous-integration @@ -72,7 +72,8 @@ These variables can be placed in the starter workflow and will be substituted as ## How to test templates before publishing ### Disable template for public -The template author adds a `labels` array in the template's `properties.json` file with a label `preview`. This will hide the template from users, unless user uses query parameter `preview=true` in the URL. +The template author adds a `labels` array in the template's `properties.json` file with a label `preview`. This will hide the template from users, unless user uses query parameter `preview=true` in the workflow creation page. + Example `properties.json` file: ```json { diff --git a/code-scanning/properties/slsa-generator.properties.json b/code-scanning/properties/slsa-generator.properties.json new file mode 100644 index 0000000000..1a947a0ae3 --- /dev/null +++ b/code-scanning/properties/slsa-generator.properties.json @@ -0,0 +1,10 @@ +{ + "name": "SLSA Generator", + "description": "Generate SLSA level 3 provenance for your build artifacts to improve supply chain security", + "creator": "OpenSSF SLSA Framework", + "iconName": "octicon shield-check", + "categories": [ + "security", + "supply-chain" + ] +} diff --git a/code-scanning/slsa-generator.yml b/code-scanning/slsa-generator.yml new file mode 100644 index 0000000000..4538a1f95a --- /dev/null +++ b/code-scanning/slsa-generator.yml @@ -0,0 +1,78 @@ +# 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. + +# This workflow generates SLSA provenance for your project. +# The generation satisfies level 3 for the provenance requirements - see https://slsa.dev/spec/v0.1/requirements +# The project is an initiative of the OpenSSF (openssf.org) and is developed at +# https://github.com/slsa-framework/slsa-github-generator. +# The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier. +# For more information about SLSA and how it improves the supply-chain, visit slsa.dev. + +name: SLSA Generator + +on: + workflow_dispatch: + release: + types: [created] + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + schedule: + - cron: $cron-weekly + +permissions: + contents: read + +jobs: + build: + name: Build artifacts + runs-on: ubuntu-latest + outputs: + digests: ${{ steps.hash.outputs.digests }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + # Step 1: Build your artifacts + # ======================================================== + # Replace this section with your actual build process. + # This example creates placeholder artifacts for demo. + # ======================================================== + - name: Build artifacts + run: | + # Replace these echo commands with your actual build steps + echo "artifact1" > artifact1 + echo "artifact2" > artifact2 + + # Step 2: Generate provenance subjects + # ======================================================== + # This step generates the base64-encoded hashes of your + # artifacts that will be included in the provenance file. + # Update the sha256sum arguments to include all binaries. + # ======================================================== + - name: Generate subject for provenance + id: hash + run: | + set -euo pipefail + + # List the artifacts the provenance will refer to + files=$(ls artifact*) + + # Generate the subjects (base64 encoded) + echo "digests=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}" + + provenance: + name: Generate provenance + needs: [build] + permissions: + actions: read # To read the workflow path + id-token: write # To sign the provenance + contents: write # To add assets to a release + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.4.0 + with: + base64-subjects: "${{ needs.build.outputs.digests }}" + upload-assets: true # Optional: Upload to a new release