Skip to content

Commit a84d6d0

Browse files
committed
initial commit
0 parents  commit a84d6d0

35 files changed

+2005
-0
lines changed

.codeclimate.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
version: "2"
3+
plugins:
4+
csslint:
5+
enabled: true
6+
coffeelint:
7+
enabled: true
8+
duplication:
9+
enabled: true
10+
config:
11+
languages:
12+
- php
13+
eslint:
14+
enabled: true
15+
channel: "stable"
16+
fixme:
17+
enabled: true
18+
rubocop:
19+
enabled: true
20+
exclude_patterns:
21+
- .github/
22+
- src/Comcast/SplunkHttpEventCollectorHandler/config/
23+
- src/Comcast/SplunkHttpEventCollectorHandler/Env.php

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve the project
4+
title: "Bug Report"
5+
labels: bug
6+
assignees: orediggerco
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Link to the project used, or an example project that produces the bug
16+
2. Which command is run
17+
3. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Run Environment (please complete the following information):**
26+
- OS: [e.g. iOS]
27+
- PHP Version [e.g. 7.3]
28+
- Composer Version [e.g. `composer -V || composer --version:` ```Composer version 1.9.2 2020-01-14 16:30:31```
29+
- Installed Project Version [e.g. `composer show | grep php-legal-licenses:
30+
comcast/php-legal-licenses v1.1.4 A utility to generate a Licen...`]
31+
32+
**Additional context**
33+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: orediggerco
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/vendor
2+
composer.lock
3+
splunk-http-event-collector-handler.code-workspace
4+
/html-coverage
5+
coverage.txt
6+
coverage.html
7+
.phpunit.cache/*
8+
tests/config/input.conf
9+
tests/.password
10+
tests/.token*
11+
.DS_store
12+
tests/config/inputs.conf
13+
.env

.gitlab-ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
stages:
2+
- quality_checks
3+
- build
4+
- tests
5+
6+
7+
.sast:
8+
stage: quality_checks
9+
image: docker:latest
10+
services:
11+
- docker:dind
12+
tags:
13+
- dind
14+
rules:
15+
- when: never
16+
variables:
17+
SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers"
18+
SAST_ANALYZER_IMAGE_TAG: 2
19+
script:
20+
- echo "This should never run"
21+
- exit 1
22+
artifacts:
23+
reports:
24+
sast: gl-sast-report.json
25+
paths:
26+
- gl-sast-report.json
27+
when: on_success
28+
29+
.sast-analyzer:
30+
extends: .sast
31+
allow_failure: true
32+
script:
33+
- /analyzer run
34+
35+
code_quality:
36+
stage: quality_checks
37+
image: docker:latest
38+
tags:
39+
- dind
40+
services:
41+
- docker:dind
42+
variables:
43+
REPORT_FORMAT: html
44+
when: always
45+
script:
46+
- docker run --env SOURCE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock registry.gitlab.com/gitlab-org/ci-cd/codequality:${VERSION:-latest} /code
47+
- cat gl-code-quality-report.json
48+
artifacts:
49+
reports:
50+
codequality: gl-code-quality-report.json
51+
paths:
52+
- gl-code-quality-report.json
53+
54+
sast phpcs security audit:
55+
extends: .sast-analyzer
56+
image: "$SECURE_ANALYZERS_PREFIX/phpcs-security-audit:$SAST_ANALYZER_IMAGE_TAG"
57+
services: []
58+
tags: []
59+
rules:
60+
- if: $CI_COMMIT_TAGS
61+
when: never
62+
- when: always
63+
script:
64+
- /analyzer run --target-dir $CI_PROJECT_DIR/src
65+
66+
sast secrets detection:
67+
extends: .sast-analyzer
68+
image: "$SECURE_ANALYZERS_PREFIX/secrets:$SAST_ANALYZER_IMAGE_TAG"
69+
services: []
70+
tags: []
71+
rules:
72+
- if: $CI_COMMIT_TAGS
73+
when: never
74+
- when: always
75+
76+
sast license scanning:
77+
stage: quality_checks
78+
image: "registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:latest"
79+
rules:
80+
- if: $CI_COMMIT_TAGS
81+
when: never
82+
- when: always
83+
allow_failure: true
84+
script:
85+
- /analyzer run
86+
artifacts:
87+
reports:
88+
license_scanning: gl-license-scanning-report.json
89+
paths:
90+
- gl-license-scanning-report.json
91+
92+
qa:Composer Install:
93+
stage: build
94+
image: composer:2
95+
dependencies: []
96+
needs: []
97+
rules:
98+
- if: $CI_COMMIT_TAGS
99+
when: never
100+
- when: always
101+
script:
102+
- composer update --ignore-platform-reqs
103+
artifacts:
104+
paths:
105+
- vendor
106+
107+
phpunit tests:
108+
stage: tests
109+
image: php:7.4-cli
110+
dependencies: ["qa:Composer Install"]
111+
needs: ["qa:Composer Install"]
112+
rules:
113+
- if: $CI_COMMIT_TAGS
114+
when: never
115+
- when: always
116+
before_script:
117+
- apt-get update -y
118+
- apt-get install -y uuid-runtime
119+
script:
120+
- ./tests/start-splunk.sh
121+
- phpunit --testdox
122+
- ./tests/stop-splunk.sh

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at Comcast_Open_Source_Services@comcast.com.
59+
All complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# How to Contribute
2+
3+
Thank you for considering helping out!
4+
5+
We love to see contributions to the project and have tried to make it
6+
easy to do so. If you would like to contribute code to this project
7+
you can do so through GitHub by forking the repository and sending a
8+
pull request.
9+
10+
## Pull Requests
11+
-------------
12+
13+
* should be from a forked project with an appropriate branch name
14+
* should be narrowly focused with no more than 3 or 4 logical commits
15+
* when possible, address no more than one issue
16+
* should be reviewable in the GitHub code review tool
17+
* should be linked to any issues it relates to (ie issue number after
18+
(#) in commit messages or pull request message)
19+
20+
Expect a thorough review process for any pull requests that add functionality
21+
or change the behavior of the application. We encourage you to sketch your
22+
approach in writing on a relevant issue (or creating such an issue if needed)
23+
before starting to code, in order to save time and frustration all around.
24+
25+
## Commit messages
26+
---------------
27+
28+
Please follow the advice of the
29+
[Phonegap team](https://github.com/phonegap/phonegap/wiki/Git-Commit-Message-Format)
30+
when crafting commit messages. The advice basically comes down to:
31+
32+
* First line should be maximum 50 characters long
33+
* It should summarise the change and use imperative present tense
34+
* The rest of the commit message should come after a blank line
35+
* We encourage you to use Markdown syntax in the rest of the commit
36+
message
37+
* Preferably keep to an 72 character limit on lines in the rest of the
38+
message.
39+
40+
If a commit is related to a particular issue, put the issue number
41+
after a hash (#) somewhere in the detail. You can put the issue number
42+
in the first line summary, but only if you can also fit in a useful
43+
summary of what was changed in the commit.
44+
45+
## Attribution
46+
47+
Along with your contribution, please add yourself to the list of contributors in [CONTRIBUTORS](CONTRIBUTORS.md).
48+
49+
## Contributor License Agreement
50+
51+
Before Comcast merges your code into the project you must sign the [Comcast Contributor License Agreement (CLA)](https://gist.github.com/ComcastOSS/a7b8933dd8e368535378cda25c92d19a).
52+
53+
If you haven't previously signed a Comcast CLA, you'll automatically be asked to when you open a pull request. Alternatively, we can e-mail you a PDF that you can sign and scan back to us. Please send us an e-mail or create a new GitHub issue to request a PDF version of the CLA.
54+

CONTRIBUTORS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributors
2+
Below is a list of all contributors to the `comcast/splunk-http-event-collector-handler` project. Thank you all for your support!
3+
4+
## Owners/Members
5+
- [Adam Marshall / @orediggerco](https://github.com/orediggerco) Author

0 commit comments

Comments
 (0)