Skip to content

Commit fa89a48

Browse files
authored
Merge branch 'main' into docs/security-policy
Signed-off-by: Daksh Jain <dakshjain1265@gmail.com>
2 parents e4f1e21 + 4600cbf commit fa89a48

3 files changed

Lines changed: 34 additions & 40 deletions

File tree

SECURITY.md

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,39 @@
11
# Security Policy
2-
2+
33
## Supported Versions
4-
4+
55
| Version | Supported |
66
| ------- | ------------------ |
77
| latest | :white_check_mark: |
8-
8+
99
## Reporting a Vulnerability
10-
11-
Even though this repository exists to prove that `1 == 1`, we take security
12-
seriously. If you discover a vulnerability (or somehow find a way to make
13-
`1 != 1`), please report it responsibly.
14-
15-
**Do not open a public GitHub issue for security vulnerabilities.**
16-
17-
### How to Report
18-
19-
Please report security issues by emailing the maintainer directly:
20-
21-
📧 **pycontributors@gmail.com**
22-
23-
Include the following in your report:
24-
25-
- A description of the vulnerability
26-
- Steps to reproduce the issue
27-
- The potential impact
28-
- Any suggested fixes (optional, but appreciated)
29-
### What to Expect
30-
31-
- **Acknowledgement** within 48 hours of your report
32-
- **Status update** within 7 days as we investigate
33-
- **Credit** in the fix commit/release notes if you wish (just let us know)
34-
We ask that you give us reasonable time to address the issue before any public
35-
disclosure. We appreciate responsible disclosure and will do our best to resolve
36-
confirmed vulnerabilities promptly.
37-
10+
11+
If you discover a security vulnerability within is-one-one, please send an email to the maintainers. All security vulnerabilities will be promptly addressed.
12+
Report on dakshjain1265@gmail.com
13+
Please do not report security vulnerabilities through public GitHub issues.
14+
15+
## Disclosure Policy
16+
17+
When we receive a security bug report, we will:
18+
19+
1. Confirm receipt of the vulnerability report
20+
2. Investigate and determine the impact
21+
3. Work on a fix
22+
4. Release the fix and publicly announce the vulnerability
23+
24+
We appreciate your help in keeping the project secure.
25+
26+
3827
## Scope
3928

4029
This policy applies to the source code in this repository. Since this project
41-
is a collection of Python functions that confirm `1 == 1`, the attack surface
30+
is a SANDBOX repository and collection of Python functions that confirm `1 == 1`, the attack surface
4231
is blessedly small — but we still want to handle any concerns properly.
43-
32+
4433
## Attribution
4534

4635
This security policy was created following the guidelines recommended by
4736
[GitHub's security advisories documentation](https://docs.github.com/en/code-security/security-advisories).
37+
38+
39+

is_one_one.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ def is_one_using_vector_magnitude():
100100
v = np.array([x_component, y_component])
101101
magnitude = np.linalg.norm(v)
102102
v_hat = v / magnitude
103-
if np.linalg.norm(v_hat) == 1:
103+
if math.isclose(np.linalg.norm(v_hat), 1.0):
104104
return True
105105
return False
106106

107-
def Anik_one(a):
107+
def Anik_one():
108108
a=100/100
109109
return bool(a) # cause you cant deny facts
110110

@@ -140,9 +140,8 @@ def is_one_just_to_be_sure():
140140
is_one(),
141141
is_one_unicode_distance(),
142142
is_one_using_time_travel(),
143-
is_one_using_interdimensional_tax_fraud(),
144143
is_one_using_binary(),
145-
is_one_using_interdimensional_tax_fraud(),
144+
Anik_one(),
146145
is_one_using_roman_numerals(),
147146
is_one_under_extreme_pressure(),
148147
the_one_suriya(),
@@ -160,7 +159,7 @@ def main():
160159
is_one_using_interdimensional_tax_fraud,
161160
is_one_using_binary,
162161
is_one_using_roman_numerals,
163-
is_one_using_interdimensional_tax_fraud,
162+
Anik_one,
164163
is_one_under_extreme_pressure,
165164
the_one_suriya,
166165
is_one_using_vector_magnitude,

test_core.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
import unittest
44
import is_one_one
55
import sys
6-
import io
76

87
# Fix for Windows console encoding issues with emojis
98
if sys.platform == "win32":
10-
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
9+
sys.stdout.reconfigure(encoding='utf-8')
1110

1211

1312
class TestIsOne(unittest.TestCase):
@@ -57,6 +56,10 @@ def test_is_one_just_to_be_sure(self):
5756
"""The ultimate recursive confirmation."""
5857
self.assertTrue(is_one_one.is_one_just_to_be_sure())
5958

59+
def test_anik_one(self):
60+
"""Anik's overengineered check confirms 1 == 1."""
61+
self.assertTrue(is_one_one.Anik_one())
62+
6063

6164
class TestIsNumberOne(unittest.TestCase):
6265
"""Negative testing — verify is_number_one rejects non-one values."""

0 commit comments

Comments
 (0)