Skip to content

Commit d42e6bf

Browse files
Merge pull request #8 from Contrast-Security-OSS/PRODSEC-483-actions-folder
PRODSEC-483 - scan .github/actions and subfolders
2 parents 9df07df + a0245dc commit d42e6bf

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [v1.0.6](https://github.com/Contrast-Security-OSS/actionbot/compare/v1.0.4...v1.0.6)
8+
9+
- Prodsec 475 - Logs [`#7`](https://github.com/Contrast-Security-OSS/actionbot/pull/7)
10+
- Prodsec 462 - fix policyUrl context [`#6`](https://github.com/Contrast-Security-OSS/actionbot/pull/6)
11+
- Prodsec 462 - fix policy url [`#5`](https://github.com/Contrast-Security-OSS/actionbot/pull/5)
12+
- PRODDSEC-462 - Add support to policies hosted in private Github repositories [`#4`](https://github.com/Contrast-Security-OSS/actionbot/pull/4)
13+
- chore: Logs more readable [`1909c15`](https://github.com/Contrast-Security-OSS/actionbot/commit/1909c15fcc7b4ee0d5684406dc4083fe7468347d)
14+
- chore: build [`0cdbb1e`](https://github.com/Contrast-Security-OSS/actionbot/commit/0cdbb1e07d25532a1f06842dee4cc7242d181e61)
15+
- fix: scan subdirectories in workflows and actions folder [`f11daf4`](https://github.com/Contrast-Security-OSS/actionbot/commit/f11daf4baf8cea627e2ba44a795ed774ecd3a71a)
16+
717
#### [v1.0.4](https://github.com/Contrast-Security-OSS/actionbot/compare/v1.0.3...v1.0.4)
818

19+
> 1 May 2025
20+
921
- fix: policyUrl getContents was using context owner and repo [`71e65a3`](https://github.com/Contrast-Security-OSS/actionbot/commit/71e65a36efa30aff6fc8c7e53abdb462131bf2f3)
22+
- chore: update changelog [`12fd334`](https://github.com/Contrast-Security-OSS/actionbot/commit/12fd334cbdc30bfd78602236adc3680e0ea28bc2)
1023

1124
#### [v1.0.3](https://github.com/Contrast-Security-OSS/actionbot/compare/v1.0.0...v1.0.3)
1225

lib/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38997,9 +38997,11 @@ function run(context) {
3899738997
allFiles.forEach((file) => {
3899838998
let filePath = path_1.default.parse(file);
3899938999
console.log("filePath : " + filePath);
39000+
const dirLower = filePath.dir.toLowerCase();
3900039001
if ((filePath.ext.toLowerCase() == ".yaml" ||
3900139002
filePath.ext.toLowerCase() == ".yml") &&
39002-
filePath.dir.toLowerCase() == ".github/workflows") {
39003+
dirLower.startsWith(".github/workflows") ||
39004+
dirLower.startsWith(".github/actions")) {
3900339005
workflowFilePaths.push(file);
3900439006
}
3900539007
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "actionbot",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"private": true,
55
"description": "Github Action Policy Checker as a Github Action",
66
"main": "lib/index.js",

src/main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ async function run(context: typeof github.context): Promise<void> {
141141
let filePath = path.parse(file);
142142

143143
console.log("filePath : " + filePath);
144+
const dirLower = filePath.dir.toLowerCase();
144145
if (
145-
(filePath.ext.toLowerCase() == ".yaml" ||
146+
((filePath.ext.toLowerCase() == ".yaml" ||
146147
filePath.ext.toLowerCase() == ".yml") &&
147-
filePath.dir.toLowerCase() == ".github/workflows"
148+
dirLower.startsWith(".github/workflows")) ||
149+
dirLower.startsWith(".github/actions")
148150
) {
149151
workflowFilePaths.push(file);
150152
}

0 commit comments

Comments
 (0)