Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

104
Visualizações
How do I fix issue with Git and pdfmake-chinese font?

I am currently using the 方正黑体简体.TTF font included in pdfmake-chinese library. I already tested it when printing PDFs and the Chinese fonts are displayed correctly. Right now, I want to push my Javascript file that contains the vfs_fonts.js but I'm getting an issue from Git with this particular message, "[ERROR] Tier 1 secret(s) found in file '/example.js' - check lines [57318]" when I try to commit this file. If I tried to remove 方正黑体简体.TTF in vfs_fonts.js and used Roboto instead, I can commit and push the example.js. What is the cause of the issue and how should I fix this without compromising security?

Edit: I checked and I have something like secrets dictionary in my configuration. Below are the rules considered as tier 1.

  • BEGIN RSA PRIVATE KEY

  • BEGIN DSA PRIVATE KEY

  • BEGIN EC PRIVATE KEY

  • BEGIN OPENSSH PRIVATE KEY

  • BEGIN PRIVATE KEY

  • PuTTY-User-Key-File-2

  • BEGIN SSH2 ENCRYPTED PRIVATE KEY

  • BEGIN PGP PRIVATE KEY BLOCK

  • (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

That error message looks like something from a commit hook you have set up which is looking for accidentally committed password, security keys, etc. Some sequence of bytes in the font file happens to look similar to a security key, so is accidentally triggering the check.

If the hook is correctly configured, it should ignore binary files, so the fix is to use a gitattributes file to mark .ttf files as binary. Specifcally, a file in the root of your repository called .gitattributes containing this:

*.ttf binary

If that does not fix it, you will have to look for the documentation of the particular script that generated the error, and see how to configure files it should ignore.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda