Skip to content

Commit

Permalink
Use SPDX license identifier instead of bulky headers (#530)
Browse files Browse the repository at this point in the history
* Use SPDX license identifier instead of bulky headers

There exists a nice, consistent way to denote licenses in source
files. It's called SPDX and further information is here [1].

This commit migrates the bulky apache-2 license headers with the
SPDX short identifier equivalent.

[1] https://spdx.org/ids-how

Signed-off-by: Eric Brown <browne@vmware.com>

* Update test-requirements.txt
  • Loading branch information
ericwb authored Jan 5, 2020
1 parent 79e0502 commit 8ed0a5f
Show file tree
Hide file tree
Showing 81 changed files with 82 additions and 884 deletions.
12 changes: 1 addition & 11 deletions bandit/blacklists/calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2016 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

r"""
====================================================
Expand Down
12 changes: 1 addition & 11 deletions bandit/blacklists/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2016 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

r"""
======================================================
Expand Down
12 changes: 1 addition & 11 deletions bandit/blacklists/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2016 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0


def build_conf_dict(name, bid, qualnames, message, level='MEDIUM'):
Expand Down
12 changes: 1 addition & 11 deletions bandit/cli/baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2015 Hewlett-Packard Enterprise
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

# #############################################################################
# Bandit Baseline is a tool that runs Bandit against a Git commit, and compares
Expand Down
12 changes: 1 addition & 11 deletions bandit/cli/config_generator.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Copyright 2015 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0
from __future__ import print_function

import argparse
Expand Down
12 changes: 1 addition & 11 deletions bandit/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0
import argparse
import fnmatch
import logging
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/blacklisting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2016 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import ast
import fnmatch
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import logging

Expand Down
12 changes: 1 addition & 11 deletions bandit/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

# default plugin name pattern
plugin_name_pattern = '*.py'
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import ast

Expand Down
12 changes: 1 addition & 11 deletions bandit/core/docs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2016 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

# where our docs are hosted
BASE_URL = 'https://bandit.readthedocs.io/en/latest/'
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/extension_loader.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# -*- coding:utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

from __future__ import print_function

Expand Down
12 changes: 1 addition & 11 deletions bandit/core/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

from __future__ import division
from __future__ import unicode_literals
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import collections
import fnmatch
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/meta_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0


import collections
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import collections

Expand Down
12 changes: 1 addition & 11 deletions bandit/core/node_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import ast
import logging
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import logging

Expand Down
12 changes: 1 addition & 11 deletions bandit/core/test_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0


import importlib
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import copy
import logging
Expand Down
12 changes: 1 addition & 11 deletions bandit/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# SPDX-License-Identifier: Apache-2.0

import ast
import logging
Expand Down
Loading

0 comments on commit 8ed0a5f

Please sign in to comment.