mega-linter-runner 8.8.1-beta202507060855.0 → 8.8.1-beta202507061123.0

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.
@@ -45,10 +45,12 @@ When you don't know what option to select, please use default values`
45
45
  default: "gitHubActions",
46
46
  choices: [
47
47
  { name: "GitHub Actions", value: "gitHubActions" },
48
- { name: "Drone CI", value: "droneCI" },
49
- { name: "Jenkins", value: "jenkins" },
50
48
  { name: "GitLab CI", value: "gitLabCI" },
51
49
  { name: "Azure Pipelines", value: "azure" },
50
+ { name: "Bitbucket Pipelines", value: "bitbucket" },
51
+ { name: "Jenkins", value: "jenkins" },
52
+ { name: "Drone CI", value: "droneCI" },
53
+ { name: "Concourse CI", value: "concourse" },
52
54
  { name: "Other, I will install workflow manually", value: "other" },
53
55
  ],
54
56
  },
@@ -126,10 +128,12 @@ When you don't know what option to select, please use default values`
126
128
  writing() {
127
129
  // Generate workflow config
128
130
  this._generateGitHubAction();
129
- this._generateDroneCI();
130
- this._generateJenkinsfile();
131
131
  this._generateGitLabCi();
132
132
  this._generateAzurePipelines();
133
+ this._generateBitbucketPipelines();
134
+ this._generateJenkinsfile();
135
+ this._generateDroneCI();
136
+ this._generateConcourseCI();
133
137
  if (this.props.ci === "other") {
134
138
  this.log(
135
139
  "Please follow manual instructions to define CI job at https://megalinter.io/installation/"
@@ -234,6 +238,8 @@ When you don't know what option to select, please use default values`
234
238
  {
235
239
  APPLY_FIXES: this.props.applyFixes === true ? "all" : "none",
236
240
  DEFAULT_BRANCH: this.props.defaultBranch,
241
+ DOCKER_IMAGE_NAME: this.dockerImageName,
242
+ DOCKER_IMAGE_VERSION: this.dockerImageVersion,
237
243
  }
238
244
  );
239
245
  }
@@ -241,8 +247,15 @@ When you don't know what option to select, please use default values`
241
247
  if (this.props.ci !== "jenkins") {
242
248
  return;
243
249
  }
244
- this.log(
245
- "Jenkinsfile config generation not implemented yet, please follow manual instructions at https://megalinter.io/installation/#jenkins"
250
+ this.fs.copyTpl(
251
+ this.templatePath("Jenkinsfile"),
252
+ this.destinationPath("Jenkinsfile"),
253
+ {
254
+ APPLY_FIXES: this.props.applyFixes === true ? "all" : "none",
255
+ DEFAULT_BRANCH: this.props.defaultBranch,
256
+ DOCKER_IMAGE_NAME: this.dockerImageName,
257
+ DOCKER_IMAGE_VERSION: this.dockerImageVersion,
258
+ }
246
259
  );
247
260
  }
248
261
 
@@ -265,8 +278,47 @@ When you don't know what option to select, please use default values`
265
278
  if (this.props.ci !== "azure") {
266
279
  return;
267
280
  }
268
- this.log(
269
- "Azure pipelines config generation not implemented yet, please follow manual instructions at https://megalinter.io/installation/#azure-pipelines"
281
+ this.fs.copyTpl(
282
+ this.templatePath("azure-pipelines.yml"),
283
+ this.destinationPath("azure-pipelines.yml"),
284
+ {
285
+ APPLY_FIXES: this.props.applyFixes === true ? "all" : "none",
286
+ DEFAULT_BRANCH: this.props.defaultBranch,
287
+ DOCKER_IMAGE_NAME: this.dockerImageName,
288
+ DOCKER_IMAGE_VERSION: this.dockerImageVersion,
289
+ }
290
+ );
291
+ }
292
+
293
+ _generateBitbucketPipelines() {
294
+ if (this.props.ci !== "bitbucket") {
295
+ return;
296
+ }
297
+ this.fs.copyTpl(
298
+ this.templatePath("bitbucket-pipelines.yml"),
299
+ this.destinationPath("bitbucket-pipelines.yml"),
300
+ {
301
+ APPLY_FIXES: this.props.applyFixes === true ? "all" : "none",
302
+ DEFAULT_BRANCH: this.props.defaultBranch,
303
+ DOCKER_IMAGE_NAME: this.dockerImageName,
304
+ DOCKER_IMAGE_VERSION: this.dockerImageVersion,
305
+ }
306
+ );
307
+ }
308
+
309
+ _generateConcourseCI() {
310
+ if (this.props.ci !== "concourse") {
311
+ return;
312
+ }
313
+ this.fs.copyTpl(
314
+ this.templatePath("concourse-task.yml"),
315
+ this.destinationPath("concourse-task.yml"),
316
+ {
317
+ APPLY_FIXES: this.props.applyFixes === true ? "all" : "none",
318
+ DEFAULT_BRANCH: this.props.defaultBranch,
319
+ DOCKER_IMAGE_NAME: this.dockerImageName,
320
+ DOCKER_IMAGE_VERSION: this.dockerImageVersion,
321
+ }
270
322
  );
271
323
  }
272
324
 
@@ -7,6 +7,12 @@ workspace:
7
7
 
8
8
  steps:
9
9
  - name: megalinter
10
- image: oxsecurity/megalinter:v8
10
+ image: <%= DOCKER_IMAGE_NAME %>:<%= DOCKER_IMAGE_VERSION %>
11
11
  environment:
12
12
  DEFAULT_WORKSPACE: /tmp/lint
13
+ # Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
14
+ # Note: Drone CI has limited access to PR metadata, this is a basic check
15
+ LLM_ADVISOR_ENABLED: >-
16
+ ${DRONE_BUILD_EVENT != 'pull_request' ||
17
+ (DRONE_PULL_REQUEST_TITLE !~ /^(chore|fix|deps?|bump)(\(.*\))?: / &&
18
+ DRONE_COMMIT_AUTHOR !~ /^(dependabot|renovate|github-actions)(\[bot\])?$/)}
@@ -17,6 +17,13 @@ mega-linter:
17
17
  # https://megalinter.io/latest/config-file/
18
18
  DEFAULT_WORKSPACE: $CI_PROJECT_DIR
19
19
 
20
+ # Disable LLM Advisor for bot MRs (merge-train, dependabot, renovate, etc.)
21
+ LLM_ADVISOR_ENABLED: >-
22
+ ${CI_PIPELINE_SOURCE != 'merge_request_event' ||
23
+ (CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == CI_PROJECT_PATH &&
24
+ CI_MERGE_REQUEST_AUTHOR_LOGIN !~ /^(dependabot|renovate|github-actions)(\[bot\])?$/ &&
25
+ CI_MERGE_REQUEST_TITLE !~ /^(chore|fix|deps?|bump)(\(.*\))?: /)}
26
+
20
27
  # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml
21
28
  # AT THE ROOT OF YOUR REPOSITORY
22
29
 
@@ -0,0 +1,47 @@
1
+ // MegaLinter Jenkins Pipeline configuration file
2
+ // More info at https://megalinter.io
3
+
4
+ pipeline {
5
+ agent any
6
+
7
+ environment {
8
+ // All available variables are described in documentation
9
+ // https://megalinter.io/latest/config-file/
10
+ DEFAULT_WORKSPACE = "${WORKSPACE}"
11
+
12
+ // Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
13
+ // Note: Jenkins has limited access to PR metadata, this is a basic check
14
+ LLM_ADVISOR_ENABLED = script {
15
+ def branchName = env.BRANCH_NAME ?: env.GIT_BRANCH ?: ''
16
+ def changeAuthor = env.CHANGE_AUTHOR ?: ''
17
+ def changeTitle = env.CHANGE_TITLE ?: ''
18
+
19
+ if (branchName =~ /^(dependabot|renovate)\/.*/ ||
20
+ changeAuthor =~ /^(dependabot|renovate)(\[bot\])?$/ ||
21
+ changeTitle =~ /^(chore|fix|deps?|bump)(\(.*\))?: /) {
22
+ return 'false'
23
+ }
24
+ return 'true'
25
+ }
26
+ }
27
+
28
+ stages {
29
+ stage('MegaLinter') {
30
+ agent {
31
+ docker {
32
+ image '<%= DOCKER_IMAGE_NAME %>:<%= DOCKER_IMAGE_VERSION %>'
33
+ args "-u root -e VALIDATE_ALL_CODEBASE=true -v ${WORKSPACE}:/tmp/lint -e DEFAULT_WORKSPACE=/tmp/lint -e LLM_ADVISOR_ENABLED=${LLM_ADVISOR_ENABLED} --entrypoint=''"
34
+ reuseNode true
35
+ }
36
+ }
37
+ steps {
38
+ sh '/entrypoint.sh'
39
+ }
40
+ post {
41
+ always {
42
+ archiveArtifacts allowEmptyArchive: true, artifacts: 'mega-linter.log,megalinter-reports/**/*', defaultExcludes: false, followSymlinks: false
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,51 @@
1
+ # MegaLinter Azure Pipelines configuration file
2
+ # More info at https://megalinter.io
3
+
4
+ trigger:
5
+ - main
6
+
7
+ pool:
8
+ vmImage: ubuntu-latest
9
+
10
+ variables:
11
+ # All available variables are described in documentation
12
+ # https://megalinter.io/latest/config-file/
13
+ DEFAULT_WORKSPACE: $(System.DefaultWorkingDirectory)
14
+
15
+ # Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
16
+ # Note: Azure Pipelines has limited access to PR author info, this is a basic check
17
+ LLM_ADVISOR_ENABLED: >-
18
+ ${{ not(or(
19
+ contains(variables['Build.SourceBranch'], 'dependabot'),
20
+ contains(variables['Build.SourceBranch'], 'renovate'),
21
+ contains(variables['System.PullRequest.SourceBranch'], 'dependabot'),
22
+ contains(variables['System.PullRequest.SourceBranch'], 'renovate'),
23
+ startsWith(variables['Build.RequestedFor'], 'dependabot'),
24
+ startsWith(variables['Build.RequestedFor'], 'renovate')
25
+ )) }}
26
+
27
+ steps:
28
+ # Checkout repo
29
+ - checkout: self
30
+
31
+ # Pull MegaLinter docker image
32
+ - script: docker pull <%= DOCKER_IMAGE_NAME %>:<%= DOCKER_IMAGE_VERSION %>
33
+ displayName: Pull MegaLinter
34
+
35
+ # Run MegaLinter
36
+ - script: |
37
+ docker run -v $(System.DefaultWorkingDirectory):/tmp/lint \
38
+ --env-file <(env | grep -e SYSTEM_ -e BUILD_ -e TF_ -e AGENT_) \
39
+ -e SYSTEM_ACCESSTOKEN=$(System.AccessToken) \
40
+ -e GIT_AUTHORIZATION_BEARER=$(System.AccessToken) \
41
+ -e DEFAULT_WORKSPACE=/tmp/lint \
42
+ -e LLM_ADVISOR_ENABLED=$(LLM_ADVISOR_ENABLED) \
43
+ <%= DOCKER_IMAGE_NAME %>:<%= DOCKER_IMAGE_VERSION %>
44
+ displayName: Run MegaLinter
45
+
46
+ # Upload MegaLinter reports
47
+ - task: PublishPipelineArtifact@0
48
+ inputs:
49
+ targetPath: megalinter-reports
50
+ artifactName: MegaLinterReports
51
+ condition: always()
@@ -0,0 +1,25 @@
1
+ # MegaLinter Bitbucket Pipelines configuration file
2
+ # More info at https://megalinter.io
3
+
4
+ image: atlassian/default-image:3
5
+
6
+ pipelines:
7
+ default:
8
+ - parallel:
9
+ - step:
10
+ name: Run MegaLinter
11
+ image: <%= DOCKER_IMAGE_NAME %>:<%= DOCKER_IMAGE_VERSION %>
12
+ script:
13
+ # Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
14
+ # Note: Bitbucket has limited access to PR metadata, this is a basic check
15
+ - |
16
+ if [[ "$BITBUCKET_BRANCH" =~ ^(dependabot|renovate)/ ]] ||
17
+ [[ "$BITBUCKET_PR_TITLE" =~ ^(chore|fix|deps?|bump)(\(.*\))?: ]] ||
18
+ [[ "$BITBUCKET_STEP_TRIGGERER_UUID" =~ dependabot|renovate ]]; then
19
+ export LLM_ADVISOR_ENABLED=false
20
+ else
21
+ export LLM_ADVISOR_ENABLED=true
22
+ fi
23
+ - export DEFAULT_WORKSPACE=$BITBUCKET_CLONE_DIR && bash /entrypoint.sh
24
+ artifacts:
25
+ - megalinter-reports/**
@@ -0,0 +1,35 @@
1
+ # MegaLinter Concourse CI configuration file
2
+ # More info at https://megalinter.io
3
+
4
+ ---
5
+ platform: linux
6
+
7
+ image_resource:
8
+ type: docker-image
9
+ source:
10
+ repository: <%= DOCKER_IMAGE_NAME %>
11
+ tag: <%= DOCKER_IMAGE_VERSION %>
12
+
13
+ inputs:
14
+ - name: repo
15
+
16
+ run:
17
+ path: bash
18
+ args:
19
+ - -cxe
20
+ - |
21
+ cd repo
22
+ export DEFAULT_WORKSPACE=$(pwd)
23
+
24
+ # Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
25
+ # Note: Concourse CI has limited access to PR metadata, this is a basic check
26
+ # Users should manually configure this based on their pipeline setup
27
+ if [[ "${BUILD_PIPELINE_NAME:-}" =~ (dependabot|renovate) ]] ||
28
+ [[ "${BUILD_JOB_NAME:-}" =~ (dependabot|renovate) ]] ||
29
+ [[ "${GIT_BRANCH:-}" =~ ^(dependabot|renovate)/ ]]; then
30
+ export LLM_ADVISOR_ENABLED=false
31
+ else
32
+ export LLM_ADVISOR_ENABLED=true
33
+ fi
34
+
35
+ bash -ex /entrypoint.sh
@@ -84,6 +84,17 @@ jobs:
84
84
  # }}
85
85
  VALIDATE_ALL_CODEBASE: <%- VALIDATE_ALL_CODE_BASE_GHA %>
86
86
 
87
+ # Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
88
+ LLM_ADVISOR_ENABLED: >-
89
+ ${{
90
+ github.event_name != 'pull_request' ||
91
+ (github.event.pull_request.user.login != 'dependabot[bot]' &&
92
+ github.event.pull_request.user.login != 'renovate[bot]' &&
93
+ github.event.pull_request.user.login != 'github-actions[bot]' &&
94
+ !startsWith(github.event.pull_request.user.login, 'dependabot') &&
95
+ !startsWith(github.event.pull_request.user.login, 'renovate'))
96
+ }}
97
+
87
98
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88
99
 
89
100
  # Uncomment to use ApiReporter (Grafana)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mega-linter-runner",
3
- "version": "8.8.1-beta202507060855.0",
3
+ "version": "8.8.1-beta202507061123.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/oxsecurity/megalinter.git"