GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Only the first of several US phone numbers in the same input gets de-identified · Issue #3302 · googleapis/google-cloud-java

Only the first of several US phone numbers in the same input gets de-identified #3302

New issue
Copy link
New issue
Copy link
Closed
Closed
Only the first of several US phone numbers in the same input gets de-identified#3302
Copy link
Assignees
andreamlin
Labels
api: dlpIssues related to the Sensitive Data Protection API.type: questionRequest for information or clarification. Not an issue.

Description

@henrik-io
henrik-io
opened on May 22, 2018
Issue body actions

I'm sending an input string with several phone numbers to the DLP service, and it seems like only the first occurrence gets de-identified. My input looks like this: "My phone number is 408.867.5309 or 650.867.5309". My config is:

  • Using all available InfoTypes. PHONE_NUMBER is definitely in there.
  • The string gets set as one single Row in a Table which is added to a ContentItem.

The request code looks like this:

                DeidentifyContentRequest request =
                        DeidentifyContentRequest.newBuilder()
                                .setParent(ProjectName.of(projectId).toString())
                                .setDeidentifyConfig(deidentifyConfig)
                                .setInspectConfig(inspectConfig)
                                .setItem(contentItem)
                                .build();

Only the first occurrence of the phone number in the input string above gets de-identified.

Activity

  1. andreamlin
    added
    api: dlpIssues related to the Sensitive Data Protection API.
    on May 23, 2018
  2. andreamlin commented on May 23, 2018

    @andreamlin
    andreamlin
    on May 23, 2018
    Contributor
    More actions

    Calling the redaction method with a raw REST call

    {
      "inspectConfig": {
        "infoTypes": [
          {
            "name": "PHONE_NUMBER"
          }
        ]
      },
      "deidentifyConfig": {
        "infoTypeTransformations": {
          "transformations": [
            {
              "infoTypes": [
                {
                  "name": "PHONE_NUMBER"
                }
              ],
              "primitiveTransformation": {
                "redactConfig": {}
              }
            }
          ]
        }
      },
      "item": {
        "table": {
          "rows": [
            {
              "values": [
                {
                  "stringValue": "My phone number is 408.867.5309 or 650.867.5309"
                }
              ]
            }
          ],
          "headers": [
            {
              "name": "sample"
            }
          ]
        }
      }
    }
    

    also returns an inaccurate response:

    My phone number is  or 650.867.5309
    

    so this error is likely an API error rather than a Java client library error.

    An internal bug for the DLP team will be filed for this issue.

    Thanks for bringing it to our attention!

  3. andreamlin
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on May 23, 2018
  4. andreamlin
    self-assigned this
    on May 23, 2018
  5. andreamlin
    added
    type: questionRequest for information or clarification. Not an issue.
    and removed
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on May 23, 2018
  6. andreamlin commented on May 23, 2018

    @andreamlin
    andreamlin
    on May 23, 2018
    Contributor
    More actions

    If you call setMinLikelihood(VERY_UNLIKELY) on the inspectConfig, the result will be "My phone number is or "

    The heuristic for phone numbers just didn't conclude, with a high enough confidence, that the second phone number was a phone number.

    Hope that solves the problem!

  7. andreamlin commented on May 23, 2018

    @andreamlin
    andreamlin
    on May 23, 2018
    Contributor
    More actions

    Closing the issue for now. Feel free to reopen or recomment if there are further related problems.

  8. andreamlin
    closed this as completedon May 23, 2018
  9. andreamlin
    removed their assignment
    on May 23, 2018
  10. andreamlin commented on Jun 5, 2018

    @andreamlin
    andreamlin
    on Jun 5, 2018
    Contributor
    More actions

    Just a follow up, the DLP team responded to the bug saying that they are looking to adjust their heuristics to have higher confidence on that second phone number in the example you provided.

  11. henrik-io commented on Jun 5, 2018

    @henrik-io
    henrik-io
    on Jun 5, 2018
    Author
    More actions

    Awesome! Meanwhile, I followed the suggestion in the previous response and set the min likelihood to VERY_UNLIKELY and it seemed to get me past my issue.

  12. JustinBeckwith
    assigned
    andreamlin
    on Feb 1, 2021
  13. suztomo
    added a commit that references this issue on Mar 9, 2026

    test(deps): update dependency com.google.cloud:google-cloud-storage t…

    acf6e73
  14. chingor13
    added 4 commits that reference this issue on Mar 24, 2026

    deps: update google auth library dependencies to v1.29.0 (#3302)

    fbc42a6

    chore(main): release 2.48.0 (#3295)

    8cd47ec

    chore: Update generation configuration at Fri Sep 27 02:24:50 UTC 2024 (

    3afd903

    fix: fix IllegalMonitorStateException thrown from BlobAppendableUploa…

    2fc31a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @andreamlin
    andreamlin

Labels

api: dlpIssues related to the Sensitive Data Protection API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.