Skip to content

blocked-edges/4.7.28: Explicitly anchor 'from' regexp with ^/$ - #1025

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
wking:anchor-4.7.28-block-regexp
Sep 1, 2021
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
wking:anchor-4.7.28-block-regexp

Conversation

@wking

@wking wking commented Sep 1, 2021 •

Copy link
Copy Markdown
Member

For some reason, I'd expected Cincinnati to inject these anchors implicitly, but it turns out it just feeds the raw expression we supply to is_match, and is_match is looking for matching substrings.

@openshift-ci
openshift-ci Bot requested review from jwforres and sdodson September 1, 2021 19:58
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2021
@wking
wking force-pushed the anchor-4.7.28-block-regexp branch from 58bb705 to 48ef4bf Compare September 1, 2021 19:58
@wking wking changed the title blocked-edges/4.7.28: Explcitly anchor 'from' regexp with ^/$ blocked-edges/4.7.28: Explicitly anchor 'from' regexp with ^/$ Sep 1, 2021
@wking
wking force-pushed the anchor-4.7.28-block-regexp branch from 48ef4bf to 49b5808 Compare September 1, 2021 20:00
@jottofar

jottofar commented Sep 1, 2021

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Sep 1, 2021

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jottofar, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2021
@openshift-merge-robot
openshift-merge-robot merged commit 24c676d into openshift:master Sep 1, 2021
@wking
wking deleted the anchor-4.7.28-block-regexp branch September 1, 2021 20:17
wking added a commit to wking/cincinnati-graph-data that referenced this pull request Sep 2, 2021
History:

* 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28,
  4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted
  nuanced edge blocking.

* 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp
  with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like
  the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and
  similar.

* 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we
  sort regexps, 2021-09-01, openshift#1030), which went to .* because the
  anchored regexp was not matching as expected, and began allowing
  4.7.23 -> 4.7.28 and similar.

It turns out that the versions Cincinnati is comparing with are
architecture-suffixed release names [1], not the raw release name from
the release image's metadata.  So 4.7.24+amd64, etc.  The new regular
expression restores the multiple alternatives and anchors, but
includes a new '[+].*' portion to absorb the architecture suffix.

[1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking added a commit to wking/cincinnati-graph-data that referenced this pull request Sep 2, 2021
History:

* 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28,
  4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted
  nuanced edge blocking.

* 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp
  with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like
  the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and
  similar.

* 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we
  sort regexps, 2021-09-01, openshift#1030), which went to .* because the
  anchored regexp was not matching as expected, and began allowing
  4.7.23 -> 4.7.28 and similar.

It turns out that the versions Cincinnati is comparing with are
architecture-suffixed release names [1], not the raw release name from
the release image's metadata.  So 4.7.24+amd64, etc.  The new regular
expression restores the multiple alternatives and anchors, but
includes a new '[+].*' portion to absorb the architecture suffix.

[1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking added a commit to wking/cincinnati-graph-data that referenced this pull request Sep 2, 2021
History:

* 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28,
  4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted
  nuanced edge blocking.

* 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp
  with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like
  the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and
  similar.

* 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we
  sort regexps, 2021-09-01, openshift#1030), which went to .* because the
  anchored regexp was not matching as expected, and allowed
  4.7.23 -> 4.7.28 and similar.

It turns out that the versions Cincinnati is comparing with are
architecture-suffixed release names [1], not the raw release name from
the release image's metadata.  So 4.7.24+amd64, etc.  The new regular
expression restores the multiple alternatives and anchors, but
includes a new '[+].*' portion to absorb the architecture suffix.

[1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking added a commit to wking/cincinnati-graph-data that referenced this pull request Sep 2, 2021
History:

* 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28,
  4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted
  nuanced edge blocking.

* 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp
  with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like
  the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and
  similar.

* 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we
  sort regexps, 2021-09-01, openshift#1030), which went to .* because the
  anchored regexp was not matching as expected, and allowed
  4.7.23 -> 4.7.28 and similar.

It turns out that the versions Cincinnati is comparing with are
architecture-suffixed release names [1], not the raw release name from
the release image's metadata.  So 4.7.24+amd64, etc.  The new regular
expression restores the multiple alternatives and anchors, but
includes a new '[+].*' portion to absorb the architecture suffix.

[1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking added a commit to wking/cincinnati-graph-data that referenced this pull request Sep 2, 2021
History:

* 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28,
  4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted
  nuanced edge blocking.

* 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp
  with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like
  the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and
  similar.

* 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we
  sort regexps, 2021-09-01, openshift#1030), which went to .* because the
  anchored regexp was not matching as expected, and allowed
  4.7.23 -> 4.7.28 and similar.

It turns out that the versions Cincinnati is comparing with are
architecture-suffixed release names [1], not the raw release name from
the release image's metadata.  So 4.7.24+amd64, etc.  The new regular
expression restores the multiple alternatives and anchors, but
includes a new '[+].*' portion to absorb the architecture suffix.

[1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants