bitwarden_workflow_linter 0.7.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/CODEOWNERS +3 -0
  2. bitwarden_workflow_linter-0.7.0/.github/workflows/update_actions.yml → bitwarden_workflow_linter-0.8.0/.github/workflows/bwwl_operations.yml +47 -26
  3. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/PKG-INFO +1 -1
  4. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/__about__.py +1 -1
  5. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/default_actions.json +2 -7
  6. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.editorconfig +0 -0
  7. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.gitattributes +0 -0
  8. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  9. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  10. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/renovate.json +0 -0
  11. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/workflows/_version_type.yml +0 -0
  12. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/workflows/cd.yml +0 -0
  13. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/workflows/ci.yml +0 -0
  14. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/workflows/enforce-labels.yml +0 -0
  15. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.github/workflows/scan.yml +0 -0
  16. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.gitignore +0 -0
  17. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.husky/pre-commit +0 -0
  18. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/.python-version +0 -0
  19. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/CONTRIBUTING.md +0 -0
  20. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/LICENSE.txt +0 -0
  21. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/Pipfile +0 -0
  22. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/Pipfile.lock +0 -0
  23. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/README.md +0 -0
  24. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/SECURITY.md +0 -0
  25. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/Taskfile.yml +0 -0
  26. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/package-lock.json +0 -0
  27. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/package.json +0 -0
  28. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/pylintrc +0 -0
  29. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/pyproject.toml +0 -0
  30. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/pyproject.toml.tpl +0 -0
  31. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/settings.yaml +0 -0
  32. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/__init__.py +0 -0
  33. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/actions.py +0 -0
  34. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/cli.py +0 -0
  35. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/default_settings.yaml +0 -0
  36. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/lint.py +0 -0
  37. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/load.py +0 -0
  38. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/models/__init__.py +0 -0
  39. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/models/job.py +0 -0
  40. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/models/step.py +0 -0
  41. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/models/workflow.py +0 -0
  42. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rule.py +0 -0
  43. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/__init__.py +0 -0
  44. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/check_pr_target.py +0 -0
  45. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/job_environment_prefix.py +0 -0
  46. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/name_capitalized.py +0 -0
  47. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/name_exists.py +0 -0
  48. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/pinned_job_runner.py +0 -0
  49. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/run_actionlint.py +0 -0
  50. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/step_approved.py +0 -0
  51. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/step_pinned.py +0 -0
  52. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/rules/underscore_outputs.py +0 -0
  53. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/src/bitwarden_workflow_linter/utils.py +0 -0
  54. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/__init__.py +0 -0
  55. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/conftest.py +0 -0
  56. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test-alt.yml +0 -0
  57. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test-min-incorrect.yaml +0 -0
  58. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test-min.yaml +0 -0
  59. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test-outputs-incorrect.yml +0 -0
  60. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test.yml +0 -0
  61. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test_a.yaml +0 -0
  62. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test_workflow.yaml +0 -0
  63. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/fixtures/test_workflow_incorrect.yaml +0 -0
  64. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/__init__.py +0 -0
  65. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_check_pr_target.py +0 -0
  66. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_job_environment_prefix.py +0 -0
  67. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_name_capitalized.py +0 -0
  68. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_name_exists.py +0 -0
  69. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_pinned_job_runner.py +0 -0
  70. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_run_actionlint.py +0 -0
  71. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_step_approved.py +0 -0
  72. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_step_pinned.py +0 -0
  73. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/rules/test_underscore_output.py +0 -0
  74. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/test_job.py +0 -0
  75. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/test_lint.py +0 -0
  76. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/test_load.py +0 -0
  77. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/test_rule.py +0 -0
  78. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/test_step.py +0 -0
  79. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/test_utils.py +0 -0
  80. {bitwarden_workflow_linter-0.7.0 → bitwarden_workflow_linter-0.8.0}/tests/test_workflow.py +0 -0
@@ -6,3 +6,6 @@
6
6
 
7
7
  # Default file owners
8
8
  * @bitwarden/dept-bre
9
+
10
+ # App-sec owns default_actions file
11
+ src/bitwarden_workflow_linter/default_actions.json @bitwarden/team-appsec
@@ -1,14 +1,30 @@
1
- name: Update Approved Actions
1
+ name: Approved actions operations
2
2
 
3
3
  on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ operation:
7
+ description: 'Operation to perform. ex: update, add'
8
+ required: true
9
+ type: string
10
+ action:
11
+ description: 'Single action to add. ex: actions/checkout'
12
+ required: false
13
+ type: string
4
14
  schedule:
5
- - cron: '0 0 */14 * *'
15
+ - cron: '0 0 1 * *'
6
16
 
7
17
  jobs:
8
- actions-update:
9
- name: "Update Approved Actions"
18
+ actions-operation:
19
+ name: "Approved actions operations"
10
20
  runs-on: ubuntu-24.04
21
+ env:
22
+ _ACTION: ${{ inputs.action }}
11
23
  steps:
24
+ - name: Check for action input
25
+ if: ${{ inputs.operation == 'add' && !env._ACTION }}
26
+ run: echo "Action input is required for operation 'add'" && exit 1
27
+
12
28
  - name: Login to Azure - CI Subscription
13
29
  uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
14
30
  with:
@@ -22,6 +38,9 @@ jobs:
22
38
  secrets: "github-gpg-private-key,
23
39
  github-gpg-private-key-passphrase"
24
40
 
41
+ - name: Checkout Branch
42
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43
+
25
44
  - name: Import GPG key
26
45
  uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
27
46
  with:
@@ -35,9 +54,6 @@ jobs:
35
54
  git config --local user.email "106330231+bitwarden-devops-bot@users.noreply.github.com"
36
55
  git config --local user.name "bitwarden-devops-bot"
37
56
 
38
- - name: Checkout Branch
39
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40
-
41
57
  - name: Set up Python 3.11
42
58
  uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
43
59
  with:
@@ -47,16 +63,30 @@ jobs:
47
63
  run: python -m pip install --upgrade bitwarden_workflow_linter
48
64
 
49
65
  - name: Create Branch
66
+ if: ${{ github.events_name == 'schedule' }} || ${{ inputs.operation == 'update' }}
50
67
  id: create-branch
51
68
  run: |
52
69
  NAME="update-actions-$(date +'%Y%m%d-%H%M%S')"
53
70
  git switch -c $NAME
54
71
  echo "name=$NAME" >> $GITHUB_OUTPUT
55
72
 
73
+ - name: Create Branch
74
+ if: ${{ inputs.operation == 'add' }}
75
+ id: create-branch
76
+ run: |
77
+ NAME= "add-action-$_ACTION"
78
+ git switch -c $NAME
79
+ echo "name=$NAME" >> $GITHUB_OUTPUT
80
+
56
81
  - name: Run bwwl update
82
+ if: ${{ github.events_name == 'schedule' }} || ${{ inputs.operation == 'update' }}
57
83
  run: bwwl actions update -o src/bitwarden_workflow_linter/default_actions.json
58
84
 
59
- - name: Check if there are changes to commit
85
+ - name: Run bwwl add
86
+ if: ${{ inputs.operation == 'add' }}
87
+ run: bwwl actions add -o src/bitwarden_workflow_linter/default_actions.json "$_ACTION"
88
+
89
+ - name: Check for changes to commit
60
90
  id: new-changes
61
91
  run: |
62
92
  if [ -n "$(git status --porcelain)" ]; then
@@ -67,15 +97,15 @@ jobs:
67
97
  fi
68
98
 
69
99
  - name: Commit changes
70
- if: steps.new-changes.outputs.new_changes == 'TRUE'
100
+ if: ${{ steps.new-changes.outputs.new_changes == 'TRUE' }}
71
101
  env:
72
- PR_BRANCH: ${{ steps.create-branch.outputs.name }}
102
+ _PR_BRANCH: ${{ steps.create-branch.outputs.name }}
73
103
  run: |
74
104
  git commit -m "Update approved actions" -a
75
- git push origin $PR_BRANCH
105
+ git push origin "$_PR_BRANCH"
76
106
 
77
107
  - name: Generate GH App token
78
- if: steps.new-changes.outputs.new_changes == 'TRUE'
108
+ if: ${{ steps.new-changes.outputs.new_changes == 'TRUE' }}
79
109
  uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
80
110
  id: app-token
81
111
  with:
@@ -84,16 +114,16 @@ jobs:
84
114
  owner: ${{ github.repository_owner }}
85
115
 
86
116
  - name: Create PR
87
- if: steps.new-changes.outputs.new_changes == 'TRUE'
117
+ if: ${{ steps.new-changes.outputs.new_changes == 'TRUE' }}
88
118
  id: create-pr
89
119
  env:
90
120
  GH_TOKEN: ${{ steps.app-token.outputs.token }}
91
- PR_BRANCH: ${{ steps.create-branch.outputs.name }}
92
- TITLE: "Update bwwl Approved Actions"
121
+ _PR_BRANCH: ${{ steps.create-branch.outputs.name }}
122
+ _TITLE: "Update/Add bwwl approved actions"
93
123
  run: |
94
- PR_URL=$(gh pr create --title "$TITLE" \
124
+ PR_URL=$(gh pr create --title "$_TITLE" \
95
125
  --base "main" \
96
- --head "$PR_BRANCH" \
126
+ --head "$_PR_BRANCH" \
97
127
  --label "version:patch" \
98
128
  --label "automated pr" \
99
129
  --body "
@@ -107,12 +137,3 @@ jobs:
107
137
  ## Description
108
138
  - This PR updates the approved actions for the Bitwarden Workflow Linter.")
109
139
  echo "pr_number=${PR_URL##*/}" >> $GITHUB_OUTPUT
110
-
111
- - name: Approve and Merge PR
112
- if: ${{ steps.create-pr.outcome == 'success' }}
113
- env:
114
- GH_TOKEN: ${{ steps.app-token.outputs.token }}
115
- PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }}
116
- run: |
117
- gh pr review $PR_NUMBER --approve
118
- gh pr merge $PR_NUMBER --squash --auto --delete-branch
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitwarden_workflow_linter
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Custom GitHub Action Workflow Linter
5
5
  Project-URL: Homepage, https://github.com/bitwarden/workflow-linter
6
6
  Project-URL: Issues, https://github.com/bitwarden/workflow-linter/issues
@@ -1,3 +1,3 @@
1
1
  """Metadata for Workflow Linter."""
2
2
 
3
- __version__ = "0.7.0"
3
+ __version__ = "0.8.0"
@@ -181,8 +181,8 @@
181
181
  },
182
182
  "codecov/codecov-action": {
183
183
  "name": "codecov/codecov-action",
184
- "sha": "7f8b4b4bde536c465e797be725718b88c5d95e0e",
185
- "version": "v5.1.1"
184
+ "sha": "1e68e06f1dbfde0e4cefc87efeba9e4643565303",
185
+ "version": "v5.1.2"
186
186
  },
187
187
  "codecov/test-results-action": {
188
188
  "name": "codecov/test-results-action",
@@ -379,11 +379,6 @@
379
379
  "sha": "7b4da11513bf3f43f9999e90eabced41ab8bb048",
380
380
  "version": "v2.2.0"
381
381
  },
382
- "sonarsource/sonarcloud-github-action": {
383
- "name": "sonarsource/sonarcloud-github-action",
384
- "sha": "02ef91109b2d589e757aefcfb2854c2783fd7b19",
385
- "version": "v4.0.0"
386
- },
387
382
  "sonarsource/sonarqube-scan-action": {
388
383
  "name": "sonarsource/sonarqube-scan-action",
389
384
  "sha": "bfd4e558cda28cda6b5defafb9232d191be8c203",