Skip to content

Conversation

@GeorgeWestwater
Copy link
Contributor

As per the last meeting; here is a first draft of the Chef OSS Practices.

A few notes;

1/ I moved it to publish to a github pages content to make it easier to read / find for people https://chef.github.io/chef-oss-practices/ as such the markdown has moved to mkdocs format.

2/ this is a first draft. I will have another set of changes at the end of July (going to be out of town for the next 2 weeks).

let me know what you want to see that is not part of the document, raise any questions you have about process so we can capture them as well.

Comment on lines +10 to +23
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v1

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: mkdocs.yml
#EXTRA_PACKAGES: build-base
# GITHUB_DOMAIN: github.myenterprise.com
REQUIREMENTS: /requirements.txt No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 7 months ago

To fix the issue, we will add a permissions block to the workflow. Since the workflow deploys documentation to GitHub Pages, it requires contents: write permissions. We will add this block at the root level of the workflow to apply it to all jobs. This ensures that the GITHUB_TOKEN has only the necessary permissions, reducing the risk of unintended access.


Suggested changeset 1
.github/workflows/publish.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -1,2 +1,4 @@
 name: Publish docs via GitHub Pages
+permissions:
+  contents: write
 on:
EOF
@@ -1,2 +1,4 @@
name: Publish docs via GitHub Pages
permissions:
contents: write
on:
Copilot is powered by AI and may make mistakes. Always verify output.
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.

4 participants