[ 
https://issues.apache.org/jira/browse/RAT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philipp Ottlinger updated RAT-582:
----------------------------------
    Fix Version/s: 0.19

> Scripts, batch files, and DTDs are never checked
> ------------------------------------------------
>
>                 Key: RAT-582
>                 URL: https://issues.apache.org/jira/browse/RAT-582
>             Project: Apache RAT
>          Issue Type: Bug
>          Components: mime-meta-data
>    Affects Versions: 0.18
>            Reporter: Sean Palmer
>            Priority: Major
>             Fix For: 0.19
>
>
> Files whose Tika media type is in the {{application/...}} tree are classified 
> as BINARY unless listed in {{TikaProcessor.DOCUMENT_TYPE_MAP}}, so their 
> license headers are never checked. This affects several common source formats:
> * {{.sh}}, {{.bash}} ({{application/x-sh}})
> * any file starting with a {{#\!/}} line whose interpreter Tika doesn't 
> recognise by path, e.g. {{#\!/usr/bin/env python3}}, {{#\!/usr/bin/env 
> perl}}, {{#\!/usr/bin/env node}}. Tika's {{application/x-sh}} magic on 
> {{#\!/}} wins over the file name, so a {{.py}} file becomes 
> {{application/x-sh}}
> * {{.bat}}, {{.cmd}} ({{application/x-bat}})
> * {{.dtd}} ({{application/xml-dtd}})
> By contrast, {{#\!/usr/bin/python}} is detected as {{text/x-python}} and is 
> checked.
> Found while investigating 
> https://github.com/apache/tooling-trusted-releases/issues/1725. Apache 
> Trusted Releases runs RAT on uploaded source archives.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to