
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
liquibase-linter
Advanced tools
This linter is meant to check if your liquibase migrations follow some best practices.
⚠️ Only works for json and yaml formatted liquibase migrations
This rule is meant to not introduce breaking changes carelessly. Following changes are checked, as they introduce a breaking change in your database schema:
Sometimes, you will want to use one of these type of change. If you are sure that it is safe (no consumer is needing a column, for instance), you can still use it by adding the changelog in a .liquibase-linter-ignore.yaml
file
For now, the linter is only available in a JavaScript script. You need to:
npm install liquibase-linter --save-dev
or yarn add --dev liquibase-linter
)import { lint } from "liquibase-linter";
lint("my/file/path.yaml");
import { fail, warn, danger } from "danger";
import { lint } from "liquibase-linter";
const updatedFiles = [...danger.git.created_files, ...danger.git.modified_files];
const liquibaseConfig = {
failOnErrors: false,
liquibaseLinterIgnorePath: ".liquibase-linter-ignore.yaml",
};
const loggerByLevel = {
WARNING: warn,
ERROR: fail,
};
const liquibaseLinterViolations = updatedFiles
.filter(fileName => fileName.includes("src/main/resources/db/changelog"))
.flatMap(fileName => lint(fileName, liquibaseIgnoreConfig));
liquibaseLinterViolations.forEach(violation =>
loggerByLevel[violation.level](
`Changeset ${violation.changeSetId} from ${violation.fileName} fails with message: \n ${violation.message}`
)
);
You can create a liquibase linter ignore file to ignore some of the violations reported by the linter if you know the changes provided are safe.
For instance, if you add this file, the violations related to the changeSet 1623249542074-24
in your db/changes/20210609163846-failing-changeset.yaml
migration file will be ignored.
.liquibase-linter-ignore.yaml
ignores:
- fileName: db/changes/20210609163846-failing-changeset.yaml
changeSet: 1623249542074-24
FAQs
A liquibase linter in JS
We found that liquibase-linter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.