github.com/devseccon/trivy@v0.47.1-0.20231123133102-bd902a0bd996/pkg/licensing/category.go (about)

     1  package licensing
     2  
     3  // Canonical names of the licenses.
     4  // ported from https://github.com/google/licenseclassifier/blob/7c62d6fe8d3aa2f39c4affb58c9781d9dc951a2d/license_type.go#L24-L177
     5  const (
     6  	// The names come from the https://spdx.org/licenses website, and are
     7  	// also the filenames of the licenses in licenseclassifier/licenses.
     8  	AFL11                       = "AFL-1.1"
     9  	AFL12                       = "AFL-1.2"
    10  	AFL20                       = "AFL-2.0"
    11  	AFL21                       = "AFL-2.1"
    12  	AFL30                       = "AFL-3.0"
    13  	AGPL10                      = "AGPL-1.0"
    14  	AGPL30                      = "AGPL-3.0"
    15  	Apache10                    = "Apache-1.0"
    16  	Apache11                    = "Apache-1.1"
    17  	Apache20                    = "Apache-2.0"
    18  	APSL10                      = "APSL-1.0"
    19  	APSL11                      = "APSL-1.1"
    20  	APSL12                      = "APSL-1.2"
    21  	APSL20                      = "APSL-2.0"
    22  	Artistic10cl8               = "Artistic-1.0-cl8"
    23  	Artistic10Perl              = "Artistic-1.0-Perl"
    24  	Artistic10                  = "Artistic-1.0"
    25  	Artistic20                  = "Artistic-2.0"
    26  	BCL                         = "BCL"
    27  	Beerware                    = "Beerware"
    28  	BSD2ClauseFreeBSD           = "BSD-2-Clause-FreeBSD"
    29  	BSD2ClauseNetBSD            = "BSD-2-Clause-NetBSD"
    30  	BSD2Clause                  = "BSD-2-Clause"
    31  	BSD3ClauseAttribution       = "BSD-3-Clause-Attribution"
    32  	BSD3ClauseClear             = "BSD-3-Clause-Clear"
    33  	BSD3ClauseLBNL              = "BSD-3-Clause-LBNL"
    34  	BSD3Clause                  = "BSD-3-Clause"
    35  	BSD4Clause                  = "BSD-4-Clause"
    36  	BSD4ClauseUC                = "BSD-4-Clause-UC"
    37  	BSDProtection               = "BSD-Protection"
    38  	BSL10                       = "BSL-1.0"
    39  	CC010                       = "CC0-1.0"
    40  	CCBY10                      = "CC-BY-1.0"
    41  	CCBY20                      = "CC-BY-2.0"
    42  	CCBY25                      = "CC-BY-2.5"
    43  	CCBY30                      = "CC-BY-3.0"
    44  	CCBY40                      = "CC-BY-4.0"
    45  	CCBYNC10                    = "CC-BY-NC-1.0"
    46  	CCBYNC20                    = "CC-BY-NC-2.0"
    47  	CCBYNC25                    = "CC-BY-NC-2.5"
    48  	CCBYNC30                    = "CC-BY-NC-3.0"
    49  	CCBYNC40                    = "CC-BY-NC-4.0"
    50  	CCBYNCND10                  = "CC-BY-NC-ND-1.0"
    51  	CCBYNCND20                  = "CC-BY-NC-ND-2.0"
    52  	CCBYNCND25                  = "CC-BY-NC-ND-2.5"
    53  	CCBYNCND30                  = "CC-BY-NC-ND-3.0"
    54  	CCBYNCND40                  = "CC-BY-NC-ND-4.0"
    55  	CCBYNCSA10                  = "CC-BY-NC-SA-1.0"
    56  	CCBYNCSA20                  = "CC-BY-NC-SA-2.0"
    57  	CCBYNCSA25                  = "CC-BY-NC-SA-2.5"
    58  	CCBYNCSA30                  = "CC-BY-NC-SA-3.0"
    59  	CCBYNCSA40                  = "CC-BY-NC-SA-4.0"
    60  	CCBYND10                    = "CC-BY-ND-1.0"
    61  	CCBYND20                    = "CC-BY-ND-2.0"
    62  	CCBYND25                    = "CC-BY-ND-2.5"
    63  	CCBYND30                    = "CC-BY-ND-3.0"
    64  	CCBYND40                    = "CC-BY-ND-4.0"
    65  	CCBYSA10                    = "CC-BY-SA-1.0"
    66  	CCBYSA20                    = "CC-BY-SA-2.0"
    67  	CCBYSA25                    = "CC-BY-SA-2.5"
    68  	CCBYSA30                    = "CC-BY-SA-3.0"
    69  	CCBYSA40                    = "CC-BY-SA-4.0"
    70  	CDDL10                      = "CDDL-1.0"
    71  	CDDL11                      = "CDDL-1.1"
    72  	CommonsClause               = "Commons-Clause"
    73  	CPAL10                      = "CPAL-1.0"
    74  	CPL10                       = "CPL-1.0"
    75  	EGenix                      = "eGenix"
    76  	EPL10                       = "EPL-1.0"
    77  	EPL20                       = "EPL-2.0"
    78  	EUPL10                      = "EUPL-1.0"
    79  	EUPL11                      = "EUPL-1.1"
    80  	Facebook2Clause             = "Facebook-2-Clause"
    81  	Facebook3Clause             = "Facebook-3-Clause"
    82  	FacebookExamples            = "Facebook-Examples"
    83  	FreeImage                   = "FreeImage"
    84  	FTL                         = "FTL"
    85  	GFDL11WithInvariants        = "GFDL-1.1-invariants"
    86  	GFDL11NoInvariants          = "GFDL-1.1-no-invariants"
    87  	GFDL11                      = "GFDL-1.1"
    88  	GFDL12WithInvariants        = "GFDL-1.2-invariants"
    89  	GFDL12NoInvariants          = "GFDL-1.2-no-invariants"
    90  	GFDL12                      = "GFDL-1.2"
    91  	GFDL13WithInvariants        = "GFDL-1.3-invariants"
    92  	GFDL13NoInvariants          = "GFDL-1.3-no-invariants"
    93  	GFDL13                      = "GFDL-1.3"
    94  	GPL10                       = "GPL-1.0"
    95  	GPL20                       = "GPL-2.0"
    96  	GPL20withautoconfexception  = "GPL-2.0-with-autoconf-exception"
    97  	GPL20withbisonexception     = "GPL-2.0-with-bison-exception"
    98  	GPL20withclasspathexception = "GPL-2.0-with-classpath-exception"
    99  	GPL20withfontexception      = "GPL-2.0-with-font-exception"
   100  	GPL20withGCCexception       = "GPL-2.0-with-GCC-exception"
   101  	GPL30                       = "GPL-3.0"
   102  	GPL30withautoconfexception  = "GPL-3.0-with-autoconf-exception"
   103  	GPL30withGCCexception       = "GPL-3.0-with-GCC-exception"
   104  	GUSTFont                    = "GUST-Font-License"
   105  	ImageMagick                 = "ImageMagick"
   106  	IPL10                       = "IPL-1.0"
   107  	ISC                         = "ISC"
   108  	LGPL20                      = "LGPL-2.0"
   109  	LGPL21                      = "LGPL-2.1"
   110  	LGPL30                      = "LGPL-3.0"
   111  	LGPLLR                      = "LGPLLR"
   112  	Libpng                      = "Libpng"
   113  	Lil10                       = "Lil-1.0"
   114  	LinuxOpenIB                 = "Linux-OpenIB"
   115  	LPL102                      = "LPL-1.02"
   116  	LPL10                       = "LPL-1.0"
   117  	LPPL13c                     = "LPPL-1.3c"
   118  	MIT                         = "MIT"
   119  	MPL10                       = "MPL-1.0"
   120  	MPL11                       = "MPL-1.1"
   121  	MPL20                       = "MPL-2.0"
   122  	MSPL                        = "MS-PL"
   123  	NCSA                        = "NCSA"
   124  	NPL10                       = "NPL-1.0"
   125  	NPL11                       = "NPL-1.1"
   126  	OFL11                       = "OFL-1.1"
   127  	OpenSSL                     = "OpenSSL"
   128  	OpenVision                  = "OpenVision"
   129  	OSL10                       = "OSL-1.0"
   130  	OSL11                       = "OSL-1.1"
   131  	OSL20                       = "OSL-2.0"
   132  	OSL21                       = "OSL-2.1"
   133  	OSL30                       = "OSL-3.0"
   134  	PHP301                      = "PHP-3.01"
   135  	PHP30                       = "PHP-3.0"
   136  	PIL                         = "PIL"
   137  	PostgreSQL                  = "PostgreSQL"
   138  	Python20complete            = "Python-2.0-complete"
   139  	Python20                    = "Python-2.0"
   140  	QPL10                       = "QPL-1.0"
   141  	Ruby                        = "Ruby"
   142  	SGIB10                      = "SGI-B-1.0"
   143  	SGIB11                      = "SGI-B-1.1"
   144  	SGIB20                      = "SGI-B-2.0"
   145  	SISSL12                     = "SISSL-1.2"
   146  	SISSL                       = "SISSL"
   147  	Sleepycat                   = "Sleepycat"
   148  	UnicodeTOU                  = "Unicode-TOU"
   149  	UnicodeDFS2015              = "Unicode-DFS-2015"
   150  	UnicodeDFS2016              = "Unicode-DFS-2016"
   151  	Unlicense                   = "Unlicense"
   152  	UPL10                       = "UPL-1.0"
   153  	W3C19980720                 = "W3C-19980720"
   154  	W3C20150513                 = "W3C-20150513"
   155  	W3C                         = "W3C"
   156  	WTFPL                       = "WTFPL"
   157  	X11                         = "X11"
   158  	Xnet                        = "Xnet"
   159  	Zend20                      = "Zend-2.0"
   160  	ZeroBSD                     = "0BSD"
   161  	ZlibAcknowledgement         = "zlib-acknowledgement"
   162  	Zlib                        = "Zlib"
   163  	ZPL11                       = "ZPL-1.1"
   164  	ZPL20                       = "ZPL-2.0"
   165  	ZPL21                       = "ZPL-2.1"
   166  )
   167  
   168  var (
   169  	// ForbiddenLicenses - Licenses that are forbidden to be used.
   170  	// ported from https://github.com/google/licenseclassifier/blob/7c62d6fe8d3aa2f39c4affb58c9781d9dc951a2d/license_type.go#L340-L364
   171  	ForbiddenLicenses = []string{
   172  		AGPL10,
   173  		AGPL30,
   174  		CCBYNC10,
   175  		CCBYNC20,
   176  		CCBYNC25,
   177  		CCBYNC30,
   178  		CCBYNC40,
   179  		CCBYNCND10,
   180  		CCBYNCND20,
   181  		CCBYNCND25,
   182  		CCBYNCND30,
   183  		CCBYNCND40,
   184  		CCBYNCSA10,
   185  		CCBYNCSA20,
   186  		CCBYNCSA25,
   187  		CCBYNCSA30,
   188  		CCBYNCSA40,
   189  		CommonsClause,
   190  		Facebook2Clause,
   191  		Facebook3Clause,
   192  		FacebookExamples,
   193  		WTFPL,
   194  	}
   195  
   196  	// RestrictedLicenses - Licenses in this category require mandatory source distribution if we ship a product
   197  	// that includes third-party code protected by such a license.
   198  	// ported from https://github.com/google/licenseclassifier/blob/7c62d6fe8d3aa2f39c4affb58c9781d9dc951a2d/license_type.go#L182-L219
   199  	RestrictedLicenses = []string{
   200  		BCL,
   201  		CCBYND10,
   202  		CCBYND20,
   203  		CCBYND25,
   204  		CCBYND30,
   205  		CCBYND40,
   206  		CCBYSA10,
   207  		CCBYSA20,
   208  		CCBYSA25,
   209  		CCBYSA30,
   210  		CCBYSA40,
   211  		GPL10,
   212  		GPL20,
   213  		GPL20withautoconfexception,
   214  		GPL20withbisonexception,
   215  		GPL20withclasspathexception,
   216  		GPL20withfontexception,
   217  		GPL20withGCCexception,
   218  		GPL30,
   219  		GPL30withautoconfexception,
   220  		GPL30withGCCexception,
   221  		LGPL20,
   222  		LGPL21,
   223  		LGPL30,
   224  		NPL10,
   225  		NPL11,
   226  		OSL10,
   227  		OSL11,
   228  		OSL20,
   229  		OSL21,
   230  		OSL30,
   231  		QPL10,
   232  		Sleepycat,
   233  	}
   234  
   235  	// ReciprocalLicenses - These licenses allow usage of software made available  under such licenses freely
   236  	// in *unmodified* form. If the third-party source code is modified in any way these modifications to the
   237  	// original third-party source code must be made available.
   238  	ReciprocalLicenses = []string{
   239  		APSL10,
   240  		APSL11,
   241  		APSL12,
   242  		APSL20,
   243  		CDDL10,
   244  		CDDL11,
   245  		CPL10,
   246  		EPL10,
   247  		EPL20,
   248  		FreeImage,
   249  		IPL10,
   250  		MPL10,
   251  		MPL11,
   252  		MPL20,
   253  		Ruby,
   254  	}
   255  
   256  	// NoticeLicenses - These licenses contain few restrictions, allowing original or modified third-party software
   257  	// to be shipped in any product without endangering or encumbering our source code.
   258  	// All of the licenses in this category do, however, have an "original Copyright notice" or "advertising clause",
   259  	// wherein any external distributions must include the notice or clause specified in the license.
   260  	NoticeLicenses = []string{
   261  		AFL11,
   262  		AFL12,
   263  		AFL20,
   264  		AFL21,
   265  		AFL30,
   266  		Apache10,
   267  		Apache11,
   268  		Apache20,
   269  		Artistic10cl8,
   270  		Artistic10Perl,
   271  		Artistic10,
   272  		Artistic20,
   273  		BSL10,
   274  		BSD2ClauseFreeBSD,
   275  		BSD2ClauseNetBSD,
   276  		BSD2Clause,
   277  		BSD3ClauseAttribution,
   278  		BSD3ClauseClear,
   279  		BSD3ClauseLBNL,
   280  		BSD3Clause,
   281  		BSD4Clause,
   282  		BSD4ClauseUC,
   283  		BSDProtection,
   284  		CCBY10,
   285  		CCBY20,
   286  		CCBY25,
   287  		CCBY30,
   288  		CCBY40,
   289  		FTL,
   290  		ISC,
   291  		ImageMagick,
   292  		Libpng,
   293  		Lil10,
   294  		LinuxOpenIB,
   295  		LPL102,
   296  		LPL10,
   297  		MSPL,
   298  		MIT,
   299  		NCSA,
   300  		OpenSSL,
   301  		PHP301,
   302  		PHP30,
   303  		PIL,
   304  		Python20,
   305  		Python20complete,
   306  		PostgreSQL,
   307  		SGIB10,
   308  		SGIB11,
   309  		SGIB20,
   310  		UnicodeDFS2015,
   311  		UnicodeDFS2016,
   312  		UnicodeTOU,
   313  		UPL10,
   314  		W3C19980720,
   315  		W3C20150513,
   316  		W3C,
   317  		X11,
   318  		Xnet,
   319  		Zend20,
   320  		ZlibAcknowledgement,
   321  		Zlib,
   322  		ZPL11,
   323  		ZPL20,
   324  		ZPL21,
   325  	}
   326  
   327  	// PermissiveLicenses - These licenses can be used in (relatively rare) cases where third-party software is
   328  	// under a license (not "Public Domain" or "free for any use" like 'unencumbered') that is even more lenient
   329  	// than a 'notice' license. Use the 'permissive' license type when even a copyright notice is not required
   330  	// for license compliance.
   331  	PermissiveLicenses []string
   332  
   333  	// UnencumberedLicenses - Licenses that basically declare that the code is "free for any use".
   334  	UnencumberedLicenses = []string{
   335  		CC010,
   336  		Unlicense,
   337  		ZeroBSD,
   338  	}
   339  )