Skip to content

Releases

v0.2.3

Choose a tag to compare

@reuvenharrison reuvenharrison released this 25 Nov 16:48
533dbf3

Highlights

Security fix: upgraded to oasdiff v1.41.0

Every action now runs on oasdiff v1.41.0 (#227), which fixes how allow-external-refs: false is applied when the review upload is on. Both are the defaults of the breaking and changelog actions, so workflows that run them on pull requests from people you do not trust should upgrade. Workflows pinned to @v0 get the fix without a change.

With review: true, one form of $ref to a URL was requested from the runner although external refs were disallowed. A URL is now requested only when it is the spec given in base or revision.

Other changes from oasdiff v1.41.0

  • A not schema added to a request or removed from a response is reported as an error. Some pull requests will show new errors.
  • The validate action reports conflicting-paths and duplicate-parameter as errors, so it fails on specs that have either. Both were warnings.
  • exclude-elements: servers leaves server changes out of the diff action's output.

exclude-elements in breaking, changelog and pr-comment

The exclude-elements input of these three actions is ignored, and setting it prints a warning in the job log (#226). The flag it passed is not one that oasdiff breaking and oasdiff changelog accept, so a workflow that set the input failed. To turn a check off, list its id with level none in a severity levels file and point severity-levels in .oasdiff.yaml at it. The input still works in the diff action.

Full Changelog: v0.2.2...v0.2.3

v0.2.2

Choose a tag to compare

@reuvenharrison reuvenharrison released this 25 Nov 07:50
8bf13f0

Highlights

Upgraded to oasdiff v1.40.0

Every action now runs on oasdiff v1.40.0 (#225), which changes three things in the breaking, changelog and pr-comment actions:

  • A change to a parameter declared on a path item is reported on every operation under that path. It reported nothing before.
  • Header names are compared ignoring case and shown as they are written in the spec. They were shown in lowercase before.
  • exclude-elements, exclude-extensions, flatten-params and case-insensitive-headers in .oasdiff.yaml no longer apply to these actions, so setting one no longer removes changes from the report. They still apply to the diff action. To turn a check off, set its level to none in a severity levels file.

Some pull requests will show different results than with v0.2.1, including new errors where a breaking change was missed.

Full Changelog: v0.2.1...v0.2.2

v0.2.1

Choose a tag to compare

@reuvenharrison reuvenharrison released this 17 Nov 21:26
14ca700

Highlights

Each change in the pull-request comment links to its side-by-side diff

Every row of the changes table in the comment now ends with a view link. It opens the review on that change, with the old and new spec side by side, so a reviewer goes from a line in the comment straight to the lines that changed (#223). It applies with and without an oasdiff-token. The check id and its description are on the review page, one click away.

Upgraded to oasdiff v1.39.0

Every action now runs on oasdiff v1.39.0, which corrects how nullability changes are reported:

  • A change made through a oneOf or anyOf is decided by what the whole schema accepts. Adding null to a second oneOf branch takes null away from the property, and it is now reported as request-property-became-not-nullable at error level.
  • With flatten-allof, nullable: true beside an allOf is kept, so removing it is reported. It reported nothing before.

Some pull requests will show different results than with v0.2.0, including new errors where a breaking change was missed.

Fixes

  • The Pro review comment no longer shows a review state that can go out of date. With an oasdiff-token, the comment said "Review required" and kept saying it after the changes were approved, because the comment is only written when the job runs. It now points to the oasdiff status check, which is updated when a reviewer approves or rejects (#222).

Full Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@reuvenharrison reuvenharrison released this 15 Nov 19:06
0546e2e

The pull-request comment now lists the changes, and oasdiff Pro is the action you already run with a token added. Two behaviors of the changelog action change; see "Upgrading" below.

Highlights

The PR comment lists the changes

The comment the breaking and changelog actions post used to be a link to the review. It now says how many changes there are and lists them, most severe first, each with its check id and endpoint. Five rows stay open and up to fifty more collapse under them, so a reviewer reads what changed without leaving the pull request (#214).

⚠️ 3 breaking changes in this pull request

severity change endpoint
error removed the success response with the status 200 response-success-status-removed POST /api/v1.0/groups
...

Pro on the breaking action

oasdiff Pro used to need the changelog action. With an oasdiff-token, breaking now uploads an authenticated review of the breaking changes, posts the review comment and sets the oasdiff commit status, so upgrading a workflow built on breaking is one input and one permission (#216):

permissions:
  contents: read
  pull-requests: write
  statuses: write
# ...
      - uses: oasdiff/oasdiff-action/[email protected]
        with:
          base: 'origin/${{ github.base_ref }}:openapi.yaml'
          revision: 'HEAD:openapi.yaml'
          oasdiff-token: ${{ secrets.OASDIFF_TOKEN }}

If the step also sets fail-on: ERR or WARN, keep it. The job fails until every breaking change is approved and passes on the next run after that, so a job that is a required check keeps blocking the merge (#220).

changelog can fail a job, and annotates

changelog takes fail-on, including INFO and MISSING-VERSION-BUMP (#216), and writes inline annotations on the Files changed tab for changes at error and warning level, as breaking does (#217).

config input

breaking and changelog take config, the path to an oasdiff config file, for a repository that does not keep .oasdiff.yaml at its root (#216).

Upgrading

Both of these affect existing changelog workflows:

  • A fail-on in .oasdiff.yaml is now honored by changelog. The action used to ignore it there while honoring level from the same file. A workflow whose config file sets fail-on can start failing where it used to pass.
  • changelog writes annotations. Pull requests with error or warning changes get inline annotations they did not get before. Outputs and the report are unchanged.

Fixes

  • A comment that cannot be posted says what to change. A job without permissions: pull-requests: write gets a warning naming the permission. A pull request from a fork, where GitHub makes the token read-only, gets a plain line saying the link is in the job summary, since no permission helps there (#214).
  • The README documents the inputs once. breaking lists the ten inputs that describe a run, changelog refers to that list, and the oasdiff flags are pointed at .oasdiff.yaml. It also gains a section on pull requests from forks, and its severity-levels example no longer names check ids that oasdiff v1.38.0 retired (#218, #219).
  • breaking and changelog now run from one script. Their uses: paths, inputs, outputs and defaults are unchanged (#215).

Known issue

With an oasdiff-token, fail-on: MISSING-VERSION-BUMP is not cleared by approving the changes, but while the review is pending the job's notice says it will be. For that value, the way to clear the failure is a major version increase in info.version. A fix follows.

Full Changelog: v0.1.24...v0.2.0

v0.1.24

Choose a tag to compare

@reuvenharrison reuvenharrison released this 14 Nov 15:49
0b95859

Every action now runs on oasdiff v1.38.0, which adds a way to gate on version bumps and names the file each change is in.

Highlights

Fail only when a breaking change ships without a major version bump

The breaking action's fail-on input takes a new value, MISSING-VERSION-BUMP:

- uses: oasdiff/oasdiff-action/[email protected]
  with:
    base: 'main:openapi.yaml'
    revision: 'openapi.yaml'
    fail-on: MISSING-VERSION-BUMP

The step passes when the breaking changes come with a major increase in info.version, and fails when they do not. Annotations are unaffected, so reviewers see every breaking change on the Files changed tab either way, and the step log says how the version was judged:

versioning policy: violated. info.version is still 1.0.0.

See Version Bumps and Breaking Changes.

This replaces the api-version-not-bumped, api-version-decreased and api-major-version-not-bumped checks, which are retired. If a severity-levels file named in your .oasdiff.yaml lists one of those ids, it now fails to load like any other unknown id, so remove those lines when you upgrade.

Annotations name the file each change is in

  • A removal is annotated in the base spec, where the removed element still is, instead of the revision, which no longer has it.
  • A change inside a $ref'd file is annotated in that file instead of in the root document.
  • A change to info.version is annotated on that line.

Fixes

  • A description edit inside an anonymous allOf, anyOf or oneOf branch is no longer reported as a branch added and removed. Editing a description under a oneOf in a response schema used to produce response-property-one-of-added and response-property-one-of-removed for what was only a documentation change (oasdiff #1404).
  • A description an inline to $ref refactor carries is reported again. Inline and $ref branches that validate the same are matched as one branch (on by default), and a matched pair was dropped whole, so a description that differed between the inline branch and the component replacing it was reported nowhere (oasdiff #1408).
  • The validate action no longer fails on a callback cycle, which the other actions already handled (oasdiff #1401).

Full Changelog: v0.1.23...v0.1.24

v0.1.23

Choose a tag to compare

@reuvenharrison reuvenharrison released this 08 Nov 19:01
8a211b4

Runs on oasdiff v1.37.0

Every action now uses oasdiff v1.37.0 as its base image (#212). No action input or output changed, so a workflow only needs @v0.1.23, or nothing at all if it already points at @v0.

What this picks up for a workflow that checks breaking changes:

  • Nine new checks, which can fail a job that passed before. Moving a deprecated resource's sunset date earlier is now reported for endpoints, parameters and properties, deleting a deprecated property's sunset date is reported, and validate flags a schema that no payload can satisfy. Each one is downgradable with --severity-levels.
  • Localized output no longer prints %!(EXTRA ...) in Spanish, Russian and Portuguese, which affected 30 messages.
  • An unparseable x-sunset or x-stability-level value is shown quoted, so an empty value or one padded with a space is visible in the annotation rather than vanishing from it.

The full list is in the oasdiff v1.37.0 release notes, including the change fingerprints that move and what that means for a tool carrying review state.

Full Changelog: v0.1.22...v0.1.23

v0.1.22

Choose a tag to compare

@reuvenharrison reuvenharrison released this 07 Nov 16:45
17214ae

Highlights

Upgraded to oasdiff v1.36.0

Every action now runs tufin/oasdiff:v1.36.0 (#211). What a workflow author sees:

  • Inline annotations land on the changed line in a JSON spec. Source locations used to need a YAML spec, so a JSON one produced annotations attached to the file with no line or column, and the side-by-side review linked from the PR comment showed no source text at all. Both now behave as they do for YAML. One limit: positions are only as fine as the document's line breaks, so a minified spec with everything on one line puts every annotation on line 1. Run it through jq . if your specs are generated.
  • Sunset and deprecation annotations point at the field they are about. Six sunset ids annotated the deprecated line rather than the x-sunset date they complain about, and a parameter's deprecation finding looked for deprecated in the parameter's schema, so it landed on the operation line or carried no line at all.
  • Adding an allOf branch to a request is an error again, on request-body-all-of-added and request-property-all-of-added. Both were reported as warnings with a comment suggesting another branch might still keep a constraint that was dropped, which cannot happen: adding a branch only narrows what a request may send. A job that fails on error will now fail on these.
  • New fingerprints for findings inside an allOf, anyOf or oneOf branch. The branch name no longer ends in a separator, and the name is part of the fingerprint, so a stored approval for one of these changes is requested once more.
  • validate returns its findings in the same order every run, sorted by file, line and column, so a step that compares stored reports stops seeing a reshuffle on every push. A spec with callbacks can also report findings it did not before, and multiple-of-not-positive is now schema-multiple-of-not-positive.
  • The diff action takes --exclude-elements tags, which drops tag changes from diff and summary, both the tags an operation is listed under and the document's own tag definitions.

Also in the image: git revisions work on a repository mounted from the host, so the rev:path syntax no longer fails with "detected dubious ownership" on a self-hosted runner.

Full Changelog: v0.1.21...v0.1.22

v0.1.21

Choose a tag to compare

@reuvenharrison reuvenharrison released this 28 Oct 16:47
9e56cf8

Highlights

Upgraded to oasdiff v1.35.0

Every action now runs tufin/oasdiff:v1.35.0 (#210). What a workflow author sees:

  • The diff action returns the same output on every run. Parts of the diff were built from map iteration, which Go randomizes, so the order of added, deleted and modified entries moved between runs of the same comparison. A job that diffs the same pair of specs twice now gets identical bytes.
  • Two new info changes on the changelog and breaking actions, api-security-component-oauth-scope-added and api-security-component-oauth-scope-changed, because all four OAuth flows are checked now rather than only implicit. A security scheme whose authorizationCode, password or clientCredentials flow changed used to report nothing. Each finding names the flow it belongs to.
  • Removing a deprecated property follows its sunset date. A removed request property or required response property that carries deprecated: true reports request-property-removed-with-deprecation or response-required-property-removed-with-deprecation at info with no x-sunset, *-removed-before-sunset at error before the date, and nothing after it. Jobs that fail on error may see a removal escalate where the spec sets a future sunset date.
  • Security scheme URLs are compared by meaning. https://Login.Example.com:443/token and https://login.example.com/token no longer report a change.
  • Two crashes are fixed. An x-extensible-enum holding numbers ([1, 2]) no longer panics when a value is removed, and a callback that references itself no longer overflows the stack.

Also in the image: a refused external $ref exits 123 on every load path, so a step keying off the exit code can offer the allow-external-refs remedy consistently.

Full Changelog: v0.1.20...v0.1.21

v0.1.20

Choose a tag to compare

@reuvenharrison reuvenharrison released this 21 Oct 15:56
9ce3a29

A security release. Every action that uploads a review is affected in its default configuration, so upgrade.

If you pin @v0, as the README recommends, you already have this: the v0 tag now points here, so your next run picks it up with no change on your side. If you pin an exact version, move it to v0.1.20.

Changes

  • Base image bumped to oasdiff v1.34.1, which enforces the external-refs policy in the reader that --open installs (#209). Every action that uploads a review runs oasdiff with --open, so without the fix the allow-external-refs input had no effect on that path: a spec arriving in a pull request could read a file from the runner or reach an arbitrary URL, and the content went into the uploaded review. The input itself was already correct and already defaulted to false; only the enforcement one layer down was missing. Affects breaking, changelog and pr-comment. Reported by Zachariah Mithani (AploSec). See GHSA-6h8r-wgc5-q3xv.

v0.1.19

Choose a tag to compare

@reuvenharrison reuvenharrison released this 18 Oct 22:14
514e22e

oasdiff v1.34.0: security checks and one finding per shared-schema change

Every action now runs oasdiff v1.34.0.

  • Security changes are judged by who can call the endpoint. Securing an operation that had no security requirement, directly or through a top-level security it inherits, now fails breaking. Replacing or narrowing the top-level security list is reported on each operation that inherits it, at the operation's levels, instead of once at info. Changing how a security scheme sends credentials (its type, an API key's name or location, the HTTP scheme, the OpenID Connect URL) is breaking too.
  • A change in a shared schema is reported once per check, naming the schema, listing the first three properties it applies to and counting all of them, so large specs produce far fewer annotations.
  • More accurate verdicts for removing a whole enum, date or time to date-time, and readOnly / writeOnly flips, and faster comparisons of large specs.

When you upgrade, expect some findings to change once: shared-schema findings carry the schema detail in their text, and top-level security findings move to the operations that inherit the list. Review decisions or err-ignore lines tied to the old findings may need updating.

No changes to the actions themselves. oasdiff/oasdiff-action/*@v0 now points at this release.