[
https://issues.apache.org/jira/browse/RAT-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149387#comment-18149387
]
ASF subversion and git services commented on RAT-582:
-----------------------------------------------------
Commit ef914820d7467e092d23be958fdeafe14fef637e in creadur-rat's branch
refs/heads/master from Philipp Ottlinger
[ https://gitbox.apache.org/repos/asf?p=creadur-rat.git;h=ef914820d ]
RAT-582: Apply sonarcloud warning fixes
> 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
> Assignee: Philipp Ottlinger
> 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)