Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lockfile should not be generated or validate if skip option is true #909

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

massimeddu-sj
Copy link
Contributor

This PR fix the behaviour of the skip option, actually skipping the generation and the validation of the lockfiles, if it is set.

@monperrus
Copy link
Contributor

thanks for the PR.

this seems to me a dangerous option, low integrity and potential attack vector.

I don't remember why we added this option in the first place, and the doc does not convince me.

What about removing this option? WDYT?

@massimeddu-sj
Copy link
Contributor Author

thanks for the PR.

this seems to me a dangerous option, low integrity and potential attack vector.

I don't remember why we added this option in the first place, and the doc does not convince me.

What about removing this option? WDYT?

I think that the skip option is actually quite standard for maven plugins.

I can share our use case:

We would like to move the maven-lockfile into a parent-project to have a consistent configuration. However for some child projects, we would like to disable the maven-lockfile at all.

This can be done easily using the skip option in this way:

parent pom:

          <artifactId>maven-lockfile</artifactId>
          <version>5.1.3</version>
          <configuration>
            <skip>${lockfile.skip}</skip>
          </configuration>

child pom:

  <properties>
    <lockfile.skip>true</lockfile.skip>
  </properties>

without the skip option, it would be much harder to get this behavior.

Also I don't see a security risk here, as soon as we have sane defaults and clear documentation on this option.

@monperrus
Copy link
Contributor

all right, we proceed then!

thanks for your contribution

@monperrus monperrus merged commit e0fcd15 into chains-project:main Oct 1, 2024
9 checks passed
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.

2 participants