Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/basic-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

jobs:
lint:
uses: valitydev/base-workflows/.github/workflows/basic-linters.yml@v2
uses: valitydev/base-workflows/.github/workflows/basic-linters.yml@v1

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: {}

Copilot Autofix

AI 2 months ago

To address this, you should add a permissions block at the root level of the workflow (top-level in the YAML file), so it applies to all jobs in this workflow unless individually overridden. Since most linters require, at most, contents: read and not write access, the safe minimal setting is:

permissions:
  contents: read

This setting provides only the minimum access required for the workflow to read repository contents and does not permit any write operations. Place this block after the name: and before or after the on: section for consistency and clarity, ideally just after the name: entry.

Required changes:

  • Add a permissions block with contents: read at the top level (after name: and before or after on:).
  • No new imports, definitions, or methods are required.

Suggested changeset 1
.github/workflows/basic-linters.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/basic-linters.yml b/.github/workflows/basic-linters.yml
--- a/.github/workflows/basic-linters.yml
+++ b/.github/workflows/basic-linters.yml
@@ -1,4 +1,6 @@
 name: Vality basic linters
+permissions:
+  contents: read
 
 on:
   pull_request:
EOF
@@ -1,4 +1,6 @@
name: Vality basic linters
permissions:
contents: read

on:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
40 changes: 7 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
<parent>
<groupId>dev.vality</groupId>
<artifactId>service-parent-pom</artifactId>
<version>3.1.7</version>
<version>3.1.9</version>
</parent>

<properties>
<project.maintainer>Inal Arsanukaev &lt;i.arsanukaev@rbkmoney.com&gt;</project.maintainer>
<server.port>8022</server.port>
<management.port>8023</management.port>
<exposed.ports>${server.port} ${management.port}</exposed.ports>
Expand Down Expand Up @@ -63,11 +62,15 @@
<dependency>
<groupId>dev.vality</groupId>
<artifactId>damsel</artifactId>
<version>1.674-368f05b</version>
</dependency>
<dependency>
<groupId>dev.vality.geck</groupId>
<artifactId>serializer</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>dev.vality.geck</groupId>
<artifactId>filter</artifactId>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
Expand All @@ -86,12 +89,6 @@
<dependency>
<groupId>dev.vality.geck</groupId>
<artifactId>common</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>dev.vality.geck</groupId>
<artifactId>filter</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
Expand Down Expand Up @@ -167,7 +164,7 @@
<dependency>
<groupId>dev.vality</groupId>
<artifactId>testcontainers-annotations</artifactId>
<version>3.0.2</version>
<version>3.3.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -239,29 +236,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.21.0</version>
</plugin>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>makeAggregateBom</goal>
</goals>
<configuration>
<projectType>application</projectType>
<outputDirectory>${project.build.directory}</outputDirectory>
<outputFormat>json</outputFormat>
<outputName>bom</outputName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
9 changes: 5 additions & 4 deletions src/test/java/dev/vality/hooker/config/KafkaTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.vality.hooker.config;


import dev.vality.testcontainers.annotations.KafkaConfig;
import dev.vality.testcontainers.annotations.KafkaTestConfig;
import dev.vality.testcontainers.annotations.kafka.KafkaTestcontainerSingleton;
import org.springframework.test.annotation.DirtiesContext;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand All @@ -14,6 +14,7 @@
@KafkaTestcontainerSingleton(
properties = {"kafka.topics.invoice.enabled=true"},
topicsKeys = {"kafka.topics.invoice.id"})
@KafkaConfig
@KafkaTestConfig
@DirtiesContext
public @interface KafkaTest {
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.vality.hooker.config;


import dev.vality.testcontainers.annotations.postgresql.PostgresqlTestcontainer;
import dev.vality.testcontainers.annotations.postgresql.PostgresqlTestcontainerSingleton;
import org.springframework.test.annotation.DirtiesContext;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand All @@ -10,6 +10,7 @@

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@PostgresqlTestcontainer
@PostgresqlTestcontainerSingleton
@DirtiesContext
public @interface PostgresqlSpringBootITest {
}
}
Loading